Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't get form to wait for input.

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I created a report that's going to be based on a BEGINNING and ENDING DATE. The dates were to be retrieved from a form using OpenForm. The problem is that there is no pause to input the dates. This causes an error due to invalid parameters being passed to an SQL statement. I looked at the properties, and MODAL is set to YES.
 
Hi Gene,
Run this a bit reversed: Open the form, set your dates and then have a command button that opens your report. In the queries criteria for date you should have something like:
Between Forms!nameofform!TextStart And Forms!nameofform!TextEnd

Textstart and TextEnd can be the names of two text fields on your form. Gord
ghubbell@total.net
 
To get you code to pause for input you must open the form "acDialog" from the code. Setting the values in the form properties will not work. Here is an example.

DoCmd.OpenForm "YourFormName", , , , , acDialog

This will cause the code to pause at the point the form opens, and will resume after you either hide or close the form.

HTH
RDH Ricky Hicks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top