[AccessD] Programmaticly fill control events

Patricio Galleguillos pgalleguillos at plus.cl
Thu Feb 20 13:27:00 CST 2003


Hi Marcel and Group

Unless someone comes with a 'ready made' solution the steps for doing it
can be:

- Generate a list with the names of the forms and the names of the
controls to be 'evented'
- for each form get the code module (VBIDE)
- for each control in the form append the appropriate event handler(s)
in the code module. (easy at the end of the code module, checking that
it is not already written. It may have code for doing something else)

If you modify code programmatically inside a sub, it works but I'm not
sure what happens if you add a complete sub. 

I have some code that uses VBIDE to show all names of functions and subs
in a project (always forget where I put them...), if it can be useful
mail me off line. (not very much comments and all of them in spanish)

Maybe this is not very difficult for the gurus but I don't think it is
an easy task for the rest of us.

Saludos cordiales,
Patricio Galleguillos B.

pgalleguillos at plus.cl



-----Mensaje original-----
De: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com] En nombre de Marcel Vreuls
Enviado el: jueves, 20 de febrero de 2003 9:24
Para: accessd at databaseadvisors.com
Asunto: [AccessD] Programmaticly fill control events

Dear group,

I have added some more color to my app. This means the control where the
cursor is at that time is being highlighted. It works like a charm. I
have
found this solution in the archives of this list.

But I have more than 200 forms en I gues more that 2500 controls. Is
there a
way through code to add an event to a control. So open the form en check
all
controls (that's what I know) but I don not know how to add an event and
add
some code through it. Anyone?

Thanks Marcel





More information about the AccessD mailing list