Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to auto close all databases for a backup

Status
Not open for further replies.

sk8er1

Programmer
Jan 2, 2005
229
US
We would like to close all our databases before we do a backup. Does anyone have a routine I could use to get started. Thanks
 
I've just been working on this very same problem.
I could email the logout db but it's not 100% complete because I have to test it on more than ne system to see if the 'who's logged in' section works.

You have to put inport the clients form onto each users front end and make sure it is opened when the frontend is started (it will self hide itself after a shot period). Then import the adm in form into a admin front end. Last of all the logoff admin table needs importing to the backend and linking to the front ends both admin and client.

then its just a case of clicking on the ' start logoff users' command button to notify uses it is about to close. Let me know what you think.

in its current form you can open both forms, click on the logout button and see how it operates.

Ian M (UK) (c)

P.S. Thanks go to the members of this forum for initialising the idea.

Program Error
Programmers do it one finger at a time!
 
A simpler approach might be:

Create a table in the back-end db with a single field (Date/Time) and a single record. Default value of field is for example 1/1/1900. If you need to log everyone off, set this field to the appropriate time, eg Now() + half an hour.

In the front end create a form which just has a label control, a button and a timer. Default the form to visible = false. Set the timer to something like every 10 minutes. The timer event checks the field in the table you created, if the value is a future date/time, then display the form setting the label to some suitable text. The button would just be an OK button to rehide the form. Once the user has been notified adjust the timer to either repeatedly warn the user and /or to exit Access. Make the form modal (acDialog) - this will force the user to respond to it.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top