R
Randy
I am running the following macro that opens a case number. Field is
called number. If the number exists I want it to open the form. I do
not want it to go to the form if the worker puts in a number that does
not exist. Right now it will open the form to a blank record.
How can I fix this?
Private Sub Command31_Click()
On Error GoTo Err_Command31_Click
DoCmd.GoToRecord , , acFirst
Exit_Command31_Click:
Exit Sub
Err_Command31_Click:
MsgBox Err.Description
Resume Exit_Command31_Click
End Sub
called number. If the number exists I want it to open the form. I do
not want it to go to the form if the worker puts in a number that does
not exist. Right now it will open the form to a blank record.
How can I fix this?
Private Sub Command31_Click()
On Error GoTo Err_Command31_Click
DoCmd.GoToRecord , , acFirst
Exit_Command31_Click:
Exit Sub
Err_Command31_Click:
MsgBox Err.Description
Resume Exit_Command31_Click
End Sub