I have a command button on my form that when pressed will search for a number....
Code:
Private Sub Command8_Click()
Dim str As String
str = InputBox("What is the Business Number?", "Company")
str = "*" & str & "*"
Me.DataEntry = False
DoCmd.FindRecord str, , False, , True
End Sub
If the number doesn't exist in the list, the form shows the first number in the list.
How do I bring up a message that says the 'Number does not exist'. And if I press 'Cancel' on the button when searching , that also shows the first number on the list, which I would prefer it didn't do.
Thank you for any help you can give.