Author Topic: adding code to a form event  (Read 1955 times)

0 Members and 1 Guest are viewing this topic.

uncoolperson

  • King Gator
  • Posts: 4430
  • Doing everything in metric inches!
adding code to a form event
« on: October 22, 2010, 11:43:37 PM »
in access 97, is there a way to programmically add a sub call to an event procedure (aside for the addproc or whatnot that requires the form to be open, and actually write the code to the form module)?

have a big gigantic database that I need to add a call to a tracking sub to all the form_loaded events, and I can't figure out a handy way of doing this aside from actually doing this, and I'd prefer to only add something to the main form_load (don't have to undo everything to undo everything).
when all else fails On Error Resume Next
-----------------------
Livin like I'm on borrowed time
-----------------------
Searching for the Ballmer Peak

hugha

  • Newt
  • Posts: 103
Re: adding code to a form event
« Reply #1 on: October 23, 2010, 10:37:44 PM »
I'd try saving the code, editing with a decent text editor then reloading with hidden methods SaveAsText and LoadFromText as described here and elsewhere:

http://allenbrowne.com/ser-47.html
http://www.access-programmers.co.uk/forums/archive/index.php/t-99179.html

hth