Close button on a form will not close form - error 2585 - action cannot be carried out while process

A

Angus Comber

Hello

I have a Save button on a form which does some data processing and then
attempts to close the form like this:

DoCmd.Close acForm, Me.Name, acSaveNo

But when this line is invoked get error:

Run-time error '2585'

This action can't be carried out while processing a form or report event.

How do I close my form when I have finished my processing tasks?

Angus
 
A

Angus Comber

It's OK - I have worked it out. I put code in On Enter. If I put in
OnClick event it works.

Angus
 
C

ChrisM

That should work. It does for me on a simple form I just made. Is anything
else going on at this point? Is there any other events that might get fired
at the same time?

Cheers,

Chris.
 

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

Top