ChrisTheAncient
Technical User
I am developing a database in Access XP, based on NWinds, to monitor sales for some goodies I want to sell. So far I've got it working fine.
In the NWinds example, they used a date picking (form) system for a report that works well - for me. The report sets a public boolean variable to state whether the report is in the Open event. If the report is in this event, the date picker will work.
If a user tries to open the date picker form in isolation, trying to use the form creates a user message.
If Not Reports![Report1].blnOpening1 Then Err.Raise 0
Exit_OK_Click:
Exit Sub
Err_OK_Click:
retValue3 = MsgBox("To use this form, you must be in a report preview or design view.", vbOKOnly, "Whoops!!!")
Resume Exit_OK_Click
So far, so good (for me)!
The trouble is, I want to use this same date picker for a couple of other reports - Report2 and Report3 - as well! These other reports have the public variables blnOpening2 and blnOpening3.
Whatever syntax I seem to try and use to modify the above code to use any of the three reports ends up telling me, "To use this form, you must be in a report preview or design view."
I've been going round in circles for a couple of hours now trying to break my logic loop and my personal "Ctrl+Break" ain't helping!
What should the syntax be, p-l-e-a-s-e?
TIA
Chris
*************************************
OK, I'm stoopid. But I'm good at it!
*************************************