Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

no query matches

Status
Not open for further replies.

scottshiv

MIS
Sep 13, 2002
47
US
My users enter the name of a city on a form and press a command button to display all of the records that match that city.

In the on-click event for the command button. I launch the report that displays the records with a

DoCmd.OpenReport "City"

City's record source is "city query"

This works fine as longs as the users enter a city that matches one of the ones in the database. When they don't, a message 'error #' appears in the report.

How do I test the results of the query so that I can display an error message if there are no matches and my report if there are?
 
Take a look at the NoData event of the report.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top