I have a command button that prompts the user to enter a report number to filter the form for that specific record:
DoCmd.OpenForm "frmReport",,,"ReportNumber = [Please Enter Report Number]"
This works fine, but if the user types a report number in that doesn't exist, it still opens the form but shows a blank record... how do i get the event to cancel and show a message box letting the person know that the number they typed in isn't a valid report number?
Thanks for any help!