Pick Date in Reports

G

Guest

Hi all,

I have a report that requires the user to select a date to generate a
report. With the help of the board I have now been able to opens a date
picker form for the user to select a date and it work great. However, if the
user closes the data picker form using the 'x' button the form doesn't close
without generating the, 'Enter Parameter Value' required for the report and
the user then has to close boxes. Is there a way for the pick date form to
close gracefully. As I mentioned if used as it should be from the report and
then select a correct date all is well. Many thanks for taking the time to
read this, any help appreciated.

Debbie D.
 
G

Guest

On the unload event of the form, you can check if the date was entered, and
continue from there
If the date was not eneter you can display a message, and leave the form open

If IsNull(Me.DateField) then
msgbox "Must eneter date"
cancel = true ' Wont close the form
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top