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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to open mult-user mdb exclusively. How to "knock-users off".

Status
Not open for further replies.

ranshe

Programmer
Oct 5, 2004
27
US
QUESTION:
How can I, without corrupting records, access the multi-user mdb exclusively in VBA so it can be compacted (or anything else I may want to do with it)?

SITUATION:
I have an mdb on a server that is multi-user.
There are many clients that run against this mdb via a VB application.
All users of the VB client should be logged off by midnight.
Then the mdb is to be compacted using VBA.
Sometimes the clients my still be running against the mdb (maybe because the user went home without logging off, etc).
I need to knock-off all the users that may have left their computers on with the client VB running.
I have searched everything that I can think of to no avail.
 
What you need is a table in the database called tblLogOff with a single yes/no field in it called LogOff.
Have your vb client check that field every 5 minutes or so and have it close the database connection or shut down the application if LogOff is true.

When you want to log people off, change the field, when you are done, change it back.

hth

Ben

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top