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?
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?