G
Guest
This is a bit of a leap but worth asking anyway. I have a form with around
42 subforms. Think of it as a calendar although it is a bit more
sophisticated than that. Each subform has a different datasource and name
but the code is the same in each subform. I have a few subs including
keypress to manage where the cursor moves to, after update to validate input,
and a sub to set certain field names for the key press - which is the next
and previous subform.
I expect the code will change at some point and am trying to avoid updating
code in 42 forms. Is there a way to import code into the subform using vba?
If I could store it in a module, and import it at runtime, I can save a lot
of cutting and pasting.
Basically I want a command that says go and copy all the code in this module
and paste it into this form. One other complication. The program will be an
mde file when I finish.
42 subforms. Think of it as a calendar although it is a bit more
sophisticated than that. Each subform has a different datasource and name
but the code is the same in each subform. I have a few subs including
keypress to manage where the cursor moves to, after update to validate input,
and a sub to set certain field names for the key press - which is the next
and previous subform.
I expect the code will change at some point and am trying to avoid updating
code in 42 forms. Is there a way to import code into the subform using vba?
If I could store it in a module, and import it at runtime, I can save a lot
of cutting and pasting.
Basically I want a command that says go and copy all the code in this module
and paste it into this form. One other complication. The program will be an
mde file when I finish.