Query from a Form

aldeb

Registered User.
Local time
Today, 02:52
Joined
Dec 23, 2004
Messages
318
Query from a Form I have a form that has 3 Fields that I want to use as criteria in a query to select certain data:

From: To: Date:

The From: and To: are dropdown lists.

I have a query that is based on selecting a name from the two dropdown lists of From: and To: and inputing a date.

I can create a report from this query.

I know how to force the criteria to be selected in the query but I want to be be able to select the criteria for the query from a Form with those two dropdown lists and date fields.

Can anyone help me with this?
 
If what you want is to open a form or report based on a query that takes its parameters from an other form than have search for QueryDef in the forum and you will find many examples.

hth
SWK
 
Use the list box names as parameters in the query. For instance instead of:

like "Joe Smith"

in a name fld as a parameter, use some like:

like forms!myFormName!myNameTextBox

Make sense?
kh
 

Users who are viewing this thread

Back
Top Bottom