Unanswered: Closing a form when Query returns zero records?
If you have a form who's record set is based on a criteria that is prompted for by the query, and the query result is zero records,
what code in the onOpen property of the form will catch the zero records and give the user a custom error message and automatically close the form?
What I'm trying to do is from a switchboard, a form is called that's record set is based on a query. The query has a [prompt] in the
criteria, and this brings up a dialog asking for a student id when the form is opened. If the user enters an id that is not in the table, the resultant record set is zero records and the form opens blank.
I want to be able to determine the recordset is blank or null or zero, and
automatically put up a error message "student Id number not found" and close the form.
Any help on the code for this would be appreciated