changing OnClick behaviour @ runtime

  • Thread starter Stephan Hagemann
  • Start date
S

Stephan Hagemann

Hi folks,

is there a way in Access2000 to change the sub that an event procedure of a
control is linked to at runtime?

Thanks
Stephan
 
P

PC Datasheet

Why try to do that when all it takes is:

If This condition Then
<Do This>
Else
<Do That>
End If
 
C

Chris

Yes, you can.

forms("frmName").Controls("cmdButton").OnClick="[Event
Procedure]"

forms("frmName").Controls("cmdButton").OnClick="=MyFunction
()"


Chris
 
S

Stephan Hagemann

forms("frmName").Controls("cmdButton").OnClick="[Event
Procedure]"

forms("frmName").Controls("cmdButton").OnClick="=MyFunction
()"

Is this also possible, if I have created the control using "createcontrol"?

Stephan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top