C
Cathy
I've entered a command button on my form where I want to search the form by
the data field named "GPC." This is the code that is attached to the button.
Private Sub Search_GPC_Click()
On Error GoTo Err_Search_GPC_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Search_GPC_Click:
Exit Sub
Err_Search_GPC_Click:
MsgBox Err.Description
Resume Exit_Search_GPC_Click
End Sub
Unfortunately, when I click the button I get the following error message.
"The expression OnClick you entered as the event property setting produced
the following error: procedure declaration does not match description of
event or procedure having the same name."
I am not very familiar with code. Any help is GREATLY appreciated.
the data field named "GPC." This is the code that is attached to the button.
Private Sub Search_GPC_Click()
On Error GoTo Err_Search_GPC_Click
Screen.PreviousControl.SetFocus
DoCmd.DoMenuItem acFormBar, acEditMenu, 10, , acMenuVer70
Exit_Search_GPC_Click:
Exit Sub
Err_Search_GPC_Click:
MsgBox Err.Description
Resume Exit_Search_GPC_Click
End Sub
Unfortunately, when I click the button I get the following error message.
"The expression OnClick you entered as the event property setting produced
the following error: procedure declaration does not match description of
event or procedure having the same name."
I am not very familiar with code. Any help is GREATLY appreciated.