A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Command button Help



 
 
Thread Tools Display Modes
  #1  
Old October 20th, 2009, 01:41 PM posted to microsoft.public.access.forms
Cathy
external usenet poster
 
Posts: 253
Default Command button Help

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.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.