[AccessD] Detached event procedures

Dan Waters df.waters at outlook.com
Sat Mar 7 10:02:32 CST 2015


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



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list