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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add code to a Wizard generated form

Forms & Screen

How to add code to a Wizard generated form

by  Mike Gagnon  Posted    (Edited  )
When you use the Wizard to generate a form (including a navigation toolbar), it is sometimes neccesary to add code to the default behavior (the code that is generated by the Wizard). In order to add your own code to what the Wizard code already does, you need to call the parent class code as well as your own added code.
For example if you want to add some code to the Next button, you would modify the click event of the button (called cmdNext), by adding the following:
Code:
txtbtns.cmdNext::Click && Calls the default parent class code
Messagebox("This parent class code was executed) && Added code.

Or another way would be to use DODEFAULT()

Code:
dodefault() && Calls the default parent class code
Messagebox("This parent class code was executed) && Added code.

Mike Gagnon


Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top