Passing information from a form to a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query which asks for 3 user inputs.

I want the user to enter this information into a form and click OK, which
will open up the query, pass the information to it, then display query
results.

Is it possible to do this in Access?

Or should I have the query call up the form?

Thanks for any help,
Seth
 
I have a query which asks for 3 user inputs.

I want the user to enter this information into a form and click OK, which
will open up the query, pass the information to it, then display query
results.

Is it possible to do this in Access?

Or should I have the query call up the form?

Thanks for any help,
Seth

The query cannot "call up" a form.

All you need do is write, on the appropriate query Criteria line:
forms!FormName!ControlName

for each of the form's text controls used for the criteria.

Change FormName and ControlName to the actual name of your form and
control.

Add a command button to the form. Set it's click event to:
DoCmd.OpenQuery "QueryName"
DoCmd.Close, acForm, Me.Name
 
Back
Top