Running the same code AfterUpdate on multiple fields

B

bigriff

Ok, is there a cleaner way to do this...

If I have a function to run after update on say 30 fields. Do I have to do
that separate for each one?

myFunction blah blah blah

Then 30 separate "call myFunction" entries?
 
K

Klatuu

That would not be a good way to do it. The better way would be to create
the funtion, then call it from the After Update event of all the controls.
You can put it directly in the After Update text box in the properties
dialog. You just have to prefix it with an = and use the ()
For example:
=MyFunction()

If it will be called only from one form, put it in the form's module. If it
will be used in multiple forms, put the code in a standard module so all the
forms can see it.
 
Top