S
StuartR
I have some forms with 60 objects which I really want to re-design with Tabs.
Everyone knows that if you create a Tab in your form and copy & paste the
controls then you lose the Event links. They are there in the code module.
You just need to re-select them in the pasted control of teh same name (ie
[Event Procedure] in most of the event properties).
I figured out that if you do something like "Debug.Print frm(i).OnDblClick"
- where frm(i) is the current control you are evaluating then you will either
get "" or "[Event Procedure].
This means that I can create a loop, evaluate all the event value, save
field name, event name and form name and write it in a loop to a table.
Then after copy and paste of these fields into the tabs in the form of the
same name I can run a loop to put back the event values. Saves me checking
hundreds of event links and allows me to do this with some other complex
tools.
What I can't figure out is how to parameterise my selection of the event I
want to query and then write back.
So, in the code "Debug.Print frm(i).OnDblClick" is there a way to make
"OnDblClick" a parameter I can load in a loop such that I can write something
like:-
Debug.Print frm(i).(SubstituteParameter). where (SubstituteParameter)
evaluates to one of :-
OnClick
OnDblClick
OnMouseDown
OnMouseMove
OnMouseUp
OnChange
OnEnter
OnExit
OnGotFocus
OnKeyDown
OnKeyPress
OnKeyUp
OnLostFocus
OnNotInList
BeforeUpdate
AfterUpdate
on each loop. This means I can write everything to a table and have that
table drive the reverse process.
Or is there an easier way to do this?
Regards,
Maven
Everyone knows that if you create a Tab in your form and copy & paste the
controls then you lose the Event links. They are there in the code module.
You just need to re-select them in the pasted control of teh same name (ie
[Event Procedure] in most of the event properties).
I figured out that if you do something like "Debug.Print frm(i).OnDblClick"
- where frm(i) is the current control you are evaluating then you will either
get "" or "[Event Procedure].
This means that I can create a loop, evaluate all the event value, save
field name, event name and form name and write it in a loop to a table.
Then after copy and paste of these fields into the tabs in the form of the
same name I can run a loop to put back the event values. Saves me checking
hundreds of event links and allows me to do this with some other complex
tools.
What I can't figure out is how to parameterise my selection of the event I
want to query and then write back.
So, in the code "Debug.Print frm(i).OnDblClick" is there a way to make
"OnDblClick" a parameter I can load in a loop such that I can write something
like:-
Debug.Print frm(i).(SubstituteParameter). where (SubstituteParameter)
evaluates to one of :-
OnClick
OnDblClick
OnMouseDown
OnMouseMove
OnMouseUp
OnChange
OnEnter
OnExit
OnGotFocus
OnKeyDown
OnKeyPress
OnKeyUp
OnLostFocus
OnNotInList
BeforeUpdate
AfterUpdate
on each loop. This means I can write everything to a table and have that
table drive the reverse process.
Or is there an easier way to do this?
Regards,
Maven