speeding up development

jonnydexter

Registered User.
Local time
Today, 22:25
Joined
Aug 31, 2012
Messages
21
i have a form with 40 text boxes on it. i want to assign the same code to the onclick event and ondblclick event of all of them, is there a quicker way than creating all 80 code sections.
can i create a custom event that will check whether it was one of the textboxs clicked and pass a handle or something to identify it ?

tia
 
Make a Public Funtion in a Standard Module.
Screen.ActiveControl inside the function is one of the ways to get the control which is calls it.

Use an Expression in the Events to run the Function.

However I'm wondering if maybe you would be better with different data structure and a continuous form.
 
sorry for the delay in responding.
thanks for the suggestion. , i will look into the screen.activecontrol to see if it will fit my needs

for the moment i have added events to all the boxs :S

thanks again
 

Users who are viewing this thread

Back
Top Bottom