Close Linked Form

RexesOperator

Registered User.
Local time
Today, 11:07
Joined
Jul 15, 2006
Messages
604
I am trying to close the linked subform from a main form using a macro. The macro simply closes the two forms. I am getting the error message you see in the attached jpeg. What does this error mean? And if I can't close the linked form this way would DoCmd do it? What would be the syntax?
 

Attachments

  • closeform1.jpg
    closeform1.jpg
    75.9 KB · Views: 112
  • closeformError.jpg
    closeformError.jpg
    43.6 KB · Views: 105
can u post a screenshot of what comes up after you click OK?
 
When I click OK the halt window comes up. I've been playing around with this. It must be due to some underlying code (there is quite a lot on this form). When I create a blank form and add the macro, the macro works fine. I will see if I can find the code. I have the close buttons enabled so all is not lost.
 
The problem was some extraneous code. I had deleted a command button without deleting the code for it. Everything now works.
 

Users who are viewing this thread

Back
Top Bottom