Hi, Joe.
As Allen suggests, you're better off using a tool such as MZTools for the
code generation than the Command Button Wizard, which uses VBA 4.0 (Access
95). It doesn't look to me like it's _ever_ been updated, even in Access
2003.
You can edit the code for the Command Button Wizard, but it's probably not a
good idea. Your modifications may not be enough to prevent your having to
edit the resulting Wizard-generated code -- just to get it to compile --
because some of it appears to be "hard coded" within the Wizard, and is
unaffected by your changes to records in the table.
However, if you feel adventurous and you'd like to edit the code manually
for Access 97, then much of the code is stored in the "Declarations" and
"Body" fields of the bw_TblBtnActions table in the WZMAIN80.MDE Wizard file
in the same directory as MSAccess.EXE. For Access 2K or later versions,
this table is in the ACWZDAT.MDT Wizard file. You can add your error
handler routine in the "ErrHandler" field for these records to replace most
of the Wizard-generated code for the default error handler.
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)