Forced Shutdown

L

Larry

I thought I had a forced shutdown scenario working, but something strange is
happening.

I created a form (frmStartup) which is started using AutoExec as a hidden
form when the database is opened. The TimerInterval is set for 5 seconds, to
check a table (tblAdmin) to see if the Locked field in the table is set to
true. If it is, then the TimerInterval is changed to 1 minute and the forms
is displayed, giving the user a 2 minute countdown before the form is
automatically closed.

Once the Timer has executed 2 times (2 minutes) then it executes an
Application.Quit command.

The other thing the frmStartup form does, is when it first opens, it checks
the tblAdmin to see if the database is already locked. If it is, it opens
another form telling the user the Database is already locked, and it closes
in 5 seconds to stop users from getting into a locked database. There is a
button on this form that can be pressed to close the form right away. This
works great, when users try to get into the database when it's locked.

The problem I am having, is that when the Application.Quit is executed
(after the 2 minute countdown), it appears the frmStartup is opened (like
the database is re-opening) and the other form telling the user the database
is locked, is displayed. But when it's displayed this way, it never closes.
The button can't be pressed either, for some reason.

So, not only do I not know why the database tries to re-open, I don't
understand why the form isn't working the right way in this mode.

Any ideas?

Larry
 

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