URGENT REPLY NEEDED! CREATING AN MESSAGE on a query

K

ktfrubel

Hello,
I have a parameter query that ask for a First name and a last name. I would
like for an message to appear if no one by the names appear. I can't seem to
find anything in the discussions.

Example:
Enter First Name:
Frank
Enter Second Name
Smith

Message pops up if there is no Frank Smith in the database and Says oops
sorry try again.


Can anyone help me....I need to have t his completed by monday, and I am at
my whits ends.


Thanks
Tara
 
B

Barry Gilbert

Instead of doing it directly in a query, create a new report based on your
query. Reports have an event called OnNoData that fires when there are no
records. In this event, you can create a little macro, like this:

Action: MsgBox
Message: "No data meets your criteria"

and on the next line:
Action: CancelEvent

Save the macro and call it from the report's OnNoData event.

Barry
 

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