[AccessD] Detached event procedures

Gustav Brock gustav at cactus.dk
Sat Mar 7 10:08:13 CST 2015


Hi Dan

Yes, that works but - facing 50+ events - I looked for a less tedious procedure.

/gustav

________________________________________
Fra: accessd-bounces at databaseadvisors.com <accessd-bounces at databaseadvisors.com> på vegne af Dan Waters <df.waters at outlook.com>
Sendt: 7. marts 2015 17:02
Til: 'Access Developers discussion and problem solving'
Emne: Re: [AccessD] Detached event procedures

Hi Gustav,

After you paste the control onto the tab form, you can open the property
sheet for the control, select the Event tab, and then select Event Procedure
for the event in question.  If the procedure has its default name, then they
should be hooked up.

Sometimes my controls get 'unhooked' and that works for me.

HTH!
Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Saturday, March 07, 2015 8:39 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Detached event procedures

?Hi all


If you on a form decide to move some controls into a tab control, you
normally do a cut and paste of these controls - from the form into a page of
the tab control.

Then all the events of the controls get cleared; the [Event Procedure]
markings are gone and the code behind is detached though still present.


To restore these settings, open the code module of the form:


1. Mark all code with Ctrl+A

2. Cut it away with Ctrl-X

3. Select menu Debug, Compile

4. Paste all the code back into the empty module with Ctrl-V

5. Select Debug, Compile


Now your event procedures are hooked up again.


I knew of this little trick but had forgotten the details and found it here
after much searching:


http://bytes.com/topic/access/answers/632851-detached-event-procedures


/gustav


More information about the AccessD mailing list