Error Checkin Parameter

W

WCDoan

I have a report based on a query that asks for a date. How would I go about
checking the date entered into the parameter field to ensure that there are
records for that date? Now, if a date that has no records is entered, I get
an error message. I would like to check for this error and then proceed
accordingly. However, I don't know where the parameter dialog is coming from.
Where would I put error checking so that I could alert the user to the fact
that they entered a bad date? I'm still a newbie, but I'm slowly beginning to
understand some things in Access. I appreciate everyone's help past, present,
and future.
Thanks,
RandyM
 
K

Kernow Girl

Hi WC Doan - on the Properties for the Report go to the Event Tab and on the
On No Data line choose the three dots - this will bring up the Choose Builder
box. Choose Macro Builder. Add a MsgBox Action and a Cancel Event Action and
give it a name.. Make the Macro once and you can use it for all your reports.
I have 2 I use all the time for On Error and On No Data.
Yours - Dika
 
D

Duane Hookom

I don't care much for parameter prompts in queries. If you want to limit
your users to entering valid dates, create a combo box on a form to select
the date. Set the Row Source of the combo box to select the distinct dates
from the table your report is based on.
 
W

WCDoan

Thanks "Kernow Girl" for that answer. Amazingly, I understand what you're
saying. I think I am getting a little better at this because a couple of
months ago I would probably still be dazed and confused. Once again many
thanks.

RandyM
 
Top