DoCmd.Quit Error "The command or action 'Quit' isn't available now

S

Syvers

Hi

I need to exit an application if the user closes a certain form in the adp
and am trying to do this via the unload method. basically there can be
various instances of this form but if one instance is a certain one then it
must close the whole application.

If have tried in a blank database by putting DoCmd.Quit in the unload method
of a form and that works so there must be somthing running that is causing
this not to work in my adp. I have also tried putting a button on the form in
my adp just to see if putting DoCmd.Quit in the click event would work and it
did but this is of no use to my application.

Can anyone point me in the direction to find out more i.e. what is blocking
it or links to where this has been asked before as i cant find any.

Thanks

Paul
 
S

Syvers

Have since managed to sort this out, I was wrong about the form_unload method
working and due to the way I am using the windows API function to close
access alltogether.
 

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