Auto entering criteria

The Red Star

New member
Local time
Today, 21:19
Joined
Jul 3, 2001
Messages
9
I have a query, which searches through a table to find information , as queries do.
The problem for me however, is that i need the criteria for the query to come from a form. The query will be run as part of the opening of the said form. (the query is where the information for a subtable in the form comes from).

I tried building the criteria, but everytime i open it, it asks for the parameter value.
Any help?
 
Criteria for forms is:

=forms![formName]![FieldName]

What field on your main form is being compared for your query? It sounds like the order things are running is the culprit here.
 
Search Access help files for "OpenForm Method". You can provide a "Where" criteria as an argument of this method.

Here is an example:
DoCmd.OpenForm "frmEmpInfo", , , "Emp_ID =" & Me![cboEmployee].Column(0)

HTH
RDH

[This message has been edited by R. Hicks (edited 09-09-2001).]
 
Thanks for your help everyone. I'll try them out, and see what i come up with.

Tim Stevenson
 

Users who are viewing this thread

Back
Top Bottom