changing OnClick behaviour @ runtime

  • Thread starter Thread starter Stephan Hagemann
  • Start date 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
 
Why try to do that when all it takes is:

If This condition Then
<Do This>
Else
<Do That>
End If
 
Yes, you can.

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

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


Chris
 
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
 
Back
Top