Startup Form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a start-up form that I want to perform queries upon opening then close
and compact the database once finished. The problem that I will have is when
I want to maintain the database, I will not be able to stop the code from
running. What I thought I could do is open the form and give the user say 20
to 30 seconds before running the code. Then by placing a button on the form
to stop the code from running if needed. The problem is how best to make this
happen and is it possible to stop the code in the middle or would that lead
to corruption? . I would like as little user interface as possible. Example
someone opens the database each morning and walks away from it letting is do
it's job. Then code closes database and compacts it (I have that now). I then
need some mechanisim to stop or prevent the code from firing the queries to
beable to work on the database. Any ideas?

Thanks,
Dennis
 
Forms have timers associated with them. Set the form's TimerInterval value
to 20,000 (for 20 seconds) or 30,000 (for 30 seconds), and put the code in
the form's Timer event.
 
Back
Top