Need help syncing event procedures after controls are moved to tabs.

Hello Experts,

I'm using MS Access 2000 Sp1.  I don't know if this is a but specific to this older version, but this problems does exist with this version.

I create a form using text boxes, combo boxes etc, which have code in various event procedures (ongotfocus, afterupdate, onchange, etc)

Later, decide to use the tab control, so I create a tab.

I copy the controls originally created (before the tab was inserted), and paste the controls onto one tab.

At this point, everything appears to paste correctly, although none of the events work.

To fix an after update event, I need to go to the process that I would to create an event, and then PRESTO... the original event is now accessible.. so I simple close and the problem seems solved.

In my case however, I've pasted about 30 controls, and I can't remember which controls use events, and which events they use.

Since the events are still in the code, it seems like there should be an easy what to have the new tab control, link up with them.

Is there?
pcalabriaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gustav BrockCIOCommented:
From a tip of mine:
Issue
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.
 

Solution
To restore these settings, open the code module of the form. Then do:

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 again menu Debug, Compile

 Now your event procedures are hooked up again.
/gustav

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pcalabriaAuthor Commented:
Thanks Gustav!
Great to have an easy solution once in a while!
I imagine this is an Access 2K bug that was fixed in later versions?

I'll give it a try as soon as my "real long timeout expired" process completes...
I will be tonight.

PC
pcalabriaAuthor Commented:
Great solutions!
Thanks
Gustav BrockCIOCommented:
No, it is "by design" and seems not to be regarded as a bug since it lives on in A2013.

/gustav
pcalabriaAuthor Commented:
Thanks again!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.