Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing an event procedure from code

Status
Not open for further replies.

Orion45

IS-IT--Management
Feb 6, 2002
155
US
I have a form that creates controls at run-time based on criteria from the user. The controls being created are command buttons and I would like to add a small piece of code into each button's OnClick event as they are created. Access will let me do this with a macro but I would much rather define the code directly. Does anyone have any experience with dynamically changing event procedures? Any help is appreciated.
 
I would have a variable that like defines what procedures you want run, then on the on_click event, test that variable and run what you want to do.
 
I figured it out. Looks like I was just missing the second = sign.
.OnClick = "=GetValue()"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top