1200px-Microsoft_Office_Access_-2018.png

Lost code of form


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.
0

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month