Closing a Form

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

I am creating an application where I want Form A to call Form B, then have
Form A close. Does anyone know how to do this? Thank you.
 
'Open Form B
Docmd.OpenForm "FormB"
'Close Form A
Docmd.Close acForm, Me.Name, acSaveNo
 
When I tried this, I received an error 2585 (This action can't be carried out
while processing a form or report event). Any other ideas? Thanks.
 
Where are you trying to execute this code?
Try reversing the order to:

Docmd.Close acForm, Me.Name, acSaveNo
Docmd.OpenForm "FormB"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top