Query By Form

mercwonder

Registered User.
Local time
Today, 04:58
Joined
Dec 20, 2005
Messages
18
I have a form that has a bunch of unbound fields on it. I have a query that is tied to the fields of the form. The purpose is the form is a filter and when you type something in it goes through the query and then creates a report. The form is not bound to anything. Is there a way to have a list box in the form that has a list of information that people can choose multiple records from the list box and have it go through the query?
 
Last edited:
Base your form on a query or queries that pull their data from the relevant tables. This won't stop you using the value in the control as the criterion for other queries.
 
I made the record source tied to the query. However now when I run the query it brings all the records up regardless what I choose. It's as if the list box is just there for looks. Any ideas?
 
Your query needs to point to the combo box. Say your combo is called MyCombo on a form called MyForm, then the criterion in the query needs to be:
Forms!MyForm!MyCombo.ColumnX

Where X is the number of the column that holds the relevant field. Note that column numbering starts at zero.
 
I'm looking to do something similar to merwonder. What I want to do is to have a form with several list boxes. These list boxes will be a selection of several various parameters. After all boxes are filled up I'm going to include a button at the bottom that will open up a report showing the data for the various list box inputs. Any suggetions on how I would go about this?
 
DarkProdigy said:
I'm looking to do something similar to merwonder. What I want to do is to have a form with several list boxes. These list boxes will be a selection of several various parameters. After all boxes are filled up I'm going to include a button at the bottom that will open up a report showing the data for the various list box inputs. Any suggetions on how I would go about this?
Have a look in the samples in this forum. There's a number of search forms in there.
 

Users who are viewing this thread

Back
Top Bottom