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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get queries to recognise data in unbound form fields?

Status
Not open for further replies.

and

Technical User
Jan 16, 2001
67
GB
Hello,

What method should I use to do this?
I have a form with 2 unbound date fields on. The user inputs two dates and then clicks buttons to preview reports based on queries that use the two unbound dates. But the queries only work if the form is refreshed before the buttons are clicked to launch the reports. I'd rather not have a 'refresh form' button - How do I make sure that the dates entered are recognised straight away before the user launches a report?

TIA

Andrew.
 
Couldn't you make the refresh form process part of your print command process? For example, enter the refresh command just before you the the DoCmd.OpenReport ReportName, acPreview. Like:

CmdPrintReport_Click()

Refresh your form command goes here
DoCmd.OpenReport reportname, acPreview

End Sub

 
Gotcha....Thanks...
Works out fine.
Andrew.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top