Thanks for the help
One more thing....
The following code searches for a customer using their name, I would like to add a message box if the name does not exist or cannot be found.
Private Sub Command2_Click()
On Error GoTo Err_Command2_Click
Dim stDocName As String
stDocName = "Find customer"
DoCmd.OpenForm stDocName, acNormal, acEdit
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
Thanks