On_Click open form stops working in split form

conardb
conardb used Ask the Experts™
on
DoCmd.OpenForm on the on_click property of the id field of a split form stopped opening the record detail form.  Adding a command button to the form to open the detail form linked by the id form does open the detail form for the record.  What can stop the command from working on the on_click method of the id field while using the button wizard to create the same action works?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
conardb ,
(Assumption#1: stops working = user clicks button but form doesn't open, no error messages)

Open the first form in Design mode. Click the id control once. Press F4 to show the properties window if it isn't showing. On the Event tab, look for On Click. If that slot is blank, you may have written the proper code in the form's module, but the code is not "wired" to the event. Change the property to:
[Event Procedure]
with the dropdown or press the . . . button and choose Code Builder. That should take you to the code you wrote.

Alternatively, the menu item Debug->Compile will try to re-wire all form events.

HTH,
pT72

Author

Commented:
Yes, user clicks button but form doesn't open and no error messages.  Alternatively, I removed and re-inserted the Id field and re-entered the code to open the form and it worked.  I did try to use a macro to troubleshoot.  The debug -> compile suggestion is helpful.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial