Query by Form-TJ

I need to do a Query by Form based on multiple selections from combo boxes on 
a form using Access 2000 I need to bring back the appropriate records in a 
subform.
0
Utf
5/31/2010 2:08:01 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

3 Replies
1273 Views

Similar Articles

[PageSpeed] 35

On Mon, 31 May 2010 07:08:01 -0700, ambushsinger
<ambushsinger@discussions.microsoft.com> wrote:

Query by Form can't do that. It can only select records in the current
form view. After that, you can potentially open a new form with that
subset of records in a subform.

-Tom.
Microsoft Access MVP


>I need to do a Query by Form based on multiple selections from combo boxes on 
>a form using Access 2000 I need to bring back the appropriate records in a 
>subform.
0
Tom
6/1/2010 2:10:41 PM
Hey Ambush!  You may have to change your design a bit.  Look here for some 
ideas on passing values from a ComboBox:
http://www.fontstuff.com/access/acctut17.htm

At the bottom of this page you can download a working sample called 
'AccessAndSQL4_2000.zip':
http://www.fontstuff.com/access/acctut17a.htm

Does that get you pretty close?

-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Tom van Stiphout" wrote:

> On Mon, 31 May 2010 07:08:01 -0700, ambushsinger
> <ambushsinger@discussions.microsoft.com> wrote:
> 
> Query by Form can't do that. It can only select records in the current
> form view. After that, you can potentially open a new form with that
> subset of records in a subform.
> 
> -Tom.
> Microsoft Access MVP
> 
> 
> >I need to do a Query by Form based on multiple selections from combo boxes on 
> >a form using Access 2000 I need to bring back the appropriate records in a 
> >subform.
> .
> 
0
Utf
6/1/2010 6:51:01 PM
Thanks a lot. My way was making me crazy.

"ryguy7272" wrote:

> Hey Ambush!  You may have to change your design a bit.  Look here for some 
> ideas on passing values from a ComboBox:
> http://www.fontstuff.com/access/acctut17.htm
> 
> At the bottom of this page you can download a working sample called 
> 'AccessAndSQL4_2000.zip':
> http://www.fontstuff.com/access/acctut17a.htm
> 
> Does that get you pretty close?
> 
> -- 
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''.
> 
> 
> "Tom van Stiphout" wrote:
> 
> > On Mon, 31 May 2010 07:08:01 -0700, ambushsinger
> > <ambushsinger@discussions.microsoft.com> wrote:
> > 
> > Query by Form can't do that. It can only select records in the current
> > form view. After that, you can potentially open a new form with that
> > subset of records in a subform.
> > 
> > -Tom.
> > Microsoft Access MVP
> > 
> > 
> > >I need to do a Query by Form based on multiple selections from combo boxes on 
> > >a form using Access 2000 I need to bring back the appropriate records in a 
> > >subform.
> > .
> > 
0
Utf
6/2/2010 2:48:05 PM
Reply:

Similar Artilces:

Custom Outlook 2007 forms to sharepoint
Hello, Can someone please confirm and help with me trying to publish of send a custom outlook 2007 form that i have created to a sharepoint list of even a database? Can this be done and if so is it hard to achieve? Thank you so much in advance! ...

Form Header Control problem
I have a form based on a query that displays fields in the form header and data is entered in the detail section. When I use the record selector to go through the records the data in the detail area is updated but not the header section. I added the header section so that I could insert a tab control at the top of the detail section. Thanks in advance for any input. ...

Query Text in the Mid of a memo
I am trying to query off a memo field [Description] the text that follows "User Name: " until the first space the "User Name: " is not in the same position nor is the text of the user name a fixed size. I am working with an InStr function but I don't know how to stop at the " " after the name. Thanks so much for any help. AngieSD wrote: >I am trying to query off a memo field [Description] the text that follows >"User Name: " until the first space the "User Name: " is not in the same >position nor is the text of the user n...

Blank Form 04-25-07
Hello. I have a form with a combo box in it which has a list of part numbers. When the user enters a part number from the list and hits the "Execute" button it takes them to another form which has detailed info about that particular part number. HOWEVER, if the user enters a bogus part number, it takes them to a completely blank form. I would like to know how to make it so that instead of going to the form it simply says "Part Number Does Not Exist." Any help on this is greatly appreciated. Thanks :) You can set the LimitToList Property of the combo to Yes, tha...

How to remove dashes and slashes form a sequence of numbers & lett
Hi I have a sequence of numbers in column D and I require to extract just the numbers and letters to column E. D 190/0-01 31-0014 pp7/44-1 uf-744-5 E 190001 310014 pp7441 uf7445 Any pointers would be much appreciated. Kind Regards Celticshadow Put this in E1: =3DSUBSTITUTE(SUBSTITUTE(D1,"/",""),"-","") and copy down as required. Hope this helps. Pete On Oct 14, 11:34=A0am, Celticshadow <Celticsha...@discussions.microsoft.com> wrote: > Hi > > I have a sequence of numbers in column D and I require to extract just th= e > ...

Form background
Hi. I'm using VC++ 7.0 do develope my MFC dialog based application. Is there some way how to set background for my form? Just like property. Drawing in runtime is unwanted. There's no problem to set background in C# project, but in MFC project I din't find any way. And the second minor question: Does MFC prject in VS.NET support the same MFC libraries just like VS 6.0 or I should provide with my program newer version of MFC? Thanks. -- German Koninin --------------------------------------------------------------------- For every complex problem, there's solution that is si...

Customizing menu item names, form names etc.?
Hi all, Is there any way to customize the names of forms - for example if I want to call an "account" a "business partner" and modify it in the menu items and form/view names as well, can I do it? Thanks in advance, -- Anurag ...

Local OLAP cubes in Excel/MS Query
Hi Can someone please recommend some good book or web page about creating local OLAP cubes using MS Query. I have some data in Access that I want to work with using cubes. Kind regards IgorM http://wang.se/en/CreateOLAPCube.html/ Ed Ferrero Hi Thanks for response. Unfortunately I still don't know if the show-details-after-double-click feature is available in pivottables linked to OLAP cubes. I tried all three connection types. With the two first options (rebuild at once and rebuild when needed) I still cannot make the pivot table to create a sheet on the fly and provide detai...

Open new form based on two criteria
I have a main form that I need to be able to open another form that is based on two different fields on the main form. This is what I have: Private Sub cmdOpenForm_Click() On Error GoTo Err_cmdOpenForm_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "SFRM_AllLocationsperContract" stLinkCriteria = (((TBL_LocationContract.ContractNumber) = "&[Forms]! [FRM_CompanyAddContracts]![txtContractID]&") And ((TBL_LocationContract. CompanyID) = "&[Forms]![FRM_CompanyAddContracts]![txtCompanyID]&")) DoCmd...

Duplicate the Record in a Form and many SubForms
I am using Allen Browne's tip that is available in his web site. However, I get a compile error stating that the variable dbFailOnError is not defined. I have search the MS Knowdledgeable base and found out the DBEngine (0) (0).Execute is no longer used in current versions. I change it to the following but I still get the same compile error message. If Me.SF_Adjacencies.Form.RecordsetClone.RecordCount > 0 Then strSql = "INSERT INTO [Adjacencies] ( DataRmID, AdjID,_ AdjRoomName, AdjRelevance ) " & _ "SELECT " & lngID &...

Using a listbox selection to limit records in a form and report
I am trying to use a listbox of names to limit the results of a form to just those names. On a similar track, I want to use the selected names to limit a report. I have the listbox created and have added a button next to it to initiate the next step, but cannot figure out how to do it. Also, would like to (if possible) use multiple listboxs in the same way (ie, name and/or department). "dascooper" <dascooper@discussions.microsoft.com> wrote in message news:1227B7CC-3345-4FDC-8EB0-94BEF46660FD@microsoft.com... >I am trying to use a listbox of names to limit the resu...

View query results in MsgBox
I have developed qryQuickLook that brings up rptQuickLook when cmdQuickLook is clicked, everything works great but I would rather see the results (never more than 10 line items) in a MsgBox than have a seperate report window open up. Is there a way to do this? Thanks Dave On Nov 23, 11:00 pm, Duane Hookom <duanehookom@NO_SPAMhotmail.com> wrote: > Why "MsgBox"? You can display the results in a dialog form with a command > button or two. > > -- > Duane Hookom > Microsoft Access MVP > > > > "maces...@gmail.com" wrote: > > I have deve...

Contact Forms
Hello Using OL2003 and I want to slightly change the "Contact" form to add another field. When I edit it, it has a different layout and the field for the contact's image is not there. How can I retain the default "contact" form and add the extra field. Am I missing something here. I have been trying to find info and do it for several hours!! Thanks Rob The new contact form layout in OL2003 and the included picture control = are not available to programmers, who will see the older layout when = they put an Outlook 2003 contact form into design mode. One work...

Print records in continuous form
I have a Continuous Form that based on a Query that selects record according to the Month. What I want to do is to be able to print all the records in this Form by one Command button. So I have the report designed and I have created a Macro “Open Report” +Print Out, but it opens only the first record to print. I did the Where condition on the Command Button On Click: [PM#]=[Forms]![FormName]![PM#]. But it’s not working how I want it to work. How I can print all the records? Thanks for the help. I have tried that and it opens the report with all the records from the original table, bu...

Writing data back to main form
I have a form that pops up when a certain value is selected in an Option Group on my main form. The user enters free from data in an unbound box on the popup form, then submits the "comment" through a background macro. The macro should write the "comment" back to the main form via a SetValue command, however, the macro is halted because it can't find the original form, which has remained open. Is SetValue the correct command to use in the macro? ...

Problem with date in user form
Hello, I create user form for database that contain dates in one column. But when I fill user form it copy the date in the database column like text and the formulas related to this cells dosen't work.The cells in the column are formated like dates. How to solve this problem? Ivo Ivo, Use DateValue to convert the text to a date, like: DataBaseCell.Value = DateValue(me.TextBox1.Text) HTH, Bernie MS Excel MVP "Ivo_69" <Ivo_69@discussions.microsoft.com> wrote in message news:DA7115AD-3107-4151-AF21-1089D3C30AF3@microsoft.com... > Hello, > I create user form f...

Report based on parameter query
I have a report that is based on an ordinary parameter query (i.e. right now it pops up dialogs asking for three values that it needs for its where clause). I use this query in several places, so I don't want to make the parameters dependent on specific form controls, which is the only information I've been able to find on google on feeding parameters in a report query's Recordsource. What I actually want to happen is to make a button in the main switchboard which, when pressed, will look up those values in a different query I already have and then use those to populate th...

Multiple Unrelated Queries In One Report or Form?
Hello guys, I've been tasked with generating a report for my boss that provides an overview of our core database statistics. This includes the total number of orders placed each month and the total value of orders placed each month. I also need to provide the same information for purchase orders, quotations and discrepancy reports. Each individual query is a piece of cake on its own but how can I display all of this information either in a form or preferably in a nicely formatted report? The queries are all completely unrelated so there's no way I can somehow joi...

Query to Compare Actual and Budget
One table defines budget (each one has a unqiue ID) Another table defines employees (each one has a unique ID) Another table defines tasks (each one has a unique ID) Another table records budgeted time by project, task, employee Another table records actual time by project, task, employee I created one query which will total up the budgeted time by project and employee (so if an employee was assigned multiple tasks on the same project, you'll just get one total for that employee for that project). I created another query which will total up actual time byt project and employee (so if an e...

Repost-Edit and save query criteria
Sorry to repost this, but I was not sure I would get help with this again and it would get lost in the list. As suggested, I created a table called ExcludeShows1 with the ShowID and Year fields. I have posted the SQL with those changes to the query. When I tested this initially, it appeared to work. Then I tried testing the queries using last year's show data for 2009. No data is being returned for 2009. Not sure what is happening that it is not returning 2009 data. SELECT Shows.ShowID, Entries.Place, IIf([Entries]>1,([Entries]-[Place])*0.5,0) AS Points1, IIf([...

Subform causes Main Form to show the same record multiple times
I have a form named Patients Info with a subform on it for Household Members. The Patients Info form is created from the table: Patients and the Household Members subform is created from the table:FedPovertyLevel. The table Patients is related to the table FedPovertyLevel in a one to many relationship. The problem I have is that when a second, third, etc Household Member is added, the button for the record selector on the main form now has to be clicked forward by the number of household members. For Example, if only one name is entered as a Household member, there is only ...

How Can You Force a Particular Popup Form Height and Width?
I am looking to force each popup form to the dimensions of height and width that I want. I tried setting the Border Style Property to Sizeable and Auto Resize to No, however when I go from Design View to Form View for the Popup Form, I have to resize the form each time; when I set the Border Style to "Thin" I cannot change the dimensions. Set your border type to thin then resize the design area grid not the forms border when in design view.. if auto resize is set to yes the form will resize to your design grids size if auto resize is set to no the form will have th...

Form code not behaving as expected
2 issues, one is a coding issue and one I think I may be able to fix with code. 1. I have a form (frmContact) where users enter time sheet data. Time is broken down into 7 different categories and into .5 hour increments within those categories. Each category is displayed as a list box. When a user enters time into the list boxes, the time they chose is highlighted. If they go on to a new record, and then back to the previous record to view or edit it, the time they chose is no longer highlighted, so they have no way of knowing the time that is being held in that record. That isn&...

Using strwhere and Like to filter form
Hi Folks I have a project form where I have a button that when clicked it it opens another form of property addresses filtered to selections made in 3 fields called projectArea1, projectArea2 and projectArea3 which are a selection of different roads. Each project could have 1 road involved or up to 3 roads. The form is based on a query and I am trying to get the criteria field of the Road field on the query to accept the strwhere clause below. I have been trying to use the strwhere and LIKE operator to filter the form to the roads inputted on the projectArea text fields. Dim CaseFrm As St...

How to update query memo field
I have an old db that I need to import a long notes field from. My new table is existing. I have managed to get the notes from the old db into a comma separated text file with just an SSN and the notes. I can import this into a table that is structured with just an SSN field and a memo field. I'm trying to run an update query to fill in the notes fields of the people already in the new table. When I run the update query it says it's going to update x number of records, but doesn't. I tried changing both the old and new tables to text fields as an experiment and then it works, but o...