Pick Date in Reports

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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
 
Back
Top