Help

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

I have a field called "Markup" that is usually Locked and
Disabled, but I have a button so that you can unlock the
field, Enable it and Set Focus on it.

This is the code"

Private Sub Command22_Click()
Me.Markup.Enabled = True
Me.Markup.Locked = False
Me.Markup.SetFocus
End Sub

Now when I click on the button the following error
message comes up:

"The expression On Click 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.

*The expression may not result in the name of a macro,
the name of a user-defined function, or [Event Procedure].
*There may have been an error evaluating the function,
event, or macro."

Please tell me what I did wrong. Thankyou!
 
The code looks good. How did you enter it for the button? Is the OnClick
property for the button set to "[Event Procedure]"?
 
Yes it is set to "[Event Procedure]".
-----Original Message-----
The code looks good. How did you enter it for the button? Is the OnClick
property for the button set to "[Event Procedure]"?

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup, not by e-mail)

Tony said:
I have a field called "Markup" that is usually Locked and
Disabled, but I have a button so that you can unlock the
field, Enable it and Set Focus on it.

This is the code"

Private Sub Command22_Click()
Me.Markup.Enabled = True
Me.Markup.Locked = False
Me.Markup.SetFocus
End Sub

Now when I click on the button the following error
message comes up:

"The expression On Click 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.

*The expression may not result in the name of a macro,
the name of a user-defined function, or [Event Procedure].
*There may have been an error evaluating the function,
event, or macro."

Please tell me what I did wrong. Thankyou!


.
 
Back
Top