Opening form based on parameter query

  • Thread starter Thread starter jdewell
  • Start date Start date
J

jdewell

Guest
Is there a way to open a form without it running the parameter query it is based on first? When we open the form, we want it to show a blank form but instead it runs the query and brings up everything because no criteria has been typed in yet.

Also, can we print the results of the query in the form without it rerunning the query?
 
Last edited:
What you can do is set the parameter of the query to an unbound combobox on the same form. So when you open it, the combobox will be null and no records will show.
 
You can also set the Allow Additions property of the form to Yes and the Allow Edits property to No. This will pull up the form to only allow a new entry.

Alternatively, if you are opening the form from another form via a command button, you can set the property directly in the VBA code.

something like:

DoCmd.OpenForm YourFormName, , , , acFormAdd

This will also open the form in Add mode rather than displaying any results from the query.

HTH

Dan
 

Users who are viewing this thread

Back
Top Bottom