Hey all
I have an access DB, where I have a "Quick search" form that is a simple text box that opens my "Customer Viewer" form on the record that is searched. Now what I want to add is some sort of an error-handler that prompts a "No result" message box in a case where there is no match to the search(instead of the current situation where it just opens my "Customer Viewer" form with no data.
This is my current code for clicking the search button:
Code:
Private Sub btnSearch_Click()
DoCmd.OpenForm "frmCustomerViewer", acNormal, , "[FirstName]='" & Me.txtSearchBox & "' OR [LastName]='" & Me.txtSearchBox & "'"
End Sub
Thanks in advance