I created a query to find records by patient's last name. If one isn't found, the blank form comes up. How can I create it so that if there is no such record, the user gets a message box with that message rather than the blank form?
You can either use one of the Domain functions before opening the next form as I suggested earlier or as KidRobot suggested check the RecordCount in the OpenEvent of the next form and display a message and cancel the open if there are no records.