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

Access 97 LDB's, Locking and all that Jazz..... 1

Status
Not open for further replies.

Chance1234

IS-IT--Management
Jul 25, 2001
7,871
US
Firstly dont blame me, i didnt design the database im talking about im jsut stuck workign with it.

Im working on a database which is on a network drive and being used by over 60 users, now the database was set up badly and no set up was done on the admin/user side,

I need to make major changes and to try and resolve this, but as the database is being used lived and those 60 people are scattered all over the place, i need a way of being able to boot everyone out and clear locking infomation so i can get exclusive access to the DB, then set it up so only i can make changes and everyoen else can only get in on a user bases.

It has been about a year since ive had to play around in Access 97 so my memory is failing a little, also im more used to using it as a back end for a VB front end, but i am sure there is a way of getting all the users out of a Access 97, by calling one of the API's to get teh network address and forcing them out. and im sure there was a nifty shareware program that could do this as well, but i havea feeling i also needed to have a .ini file with the DB

Also, without the need of a password screen how can i set the access levels for peopel opening the database i have a feelign again it is to do with that API



Chance
This sentence is NOT a statement



 
perhaps:
Create a table (MyTable) with a boolean type field ("Enable") with a record. Set the value to TRUE
Create an invisible form with timer what loads when the application starts...like:
Sub Form_Load()
Me.TimerInterval = 60000 'set timer to 60 sec
End Sub

Sub Form_Timer()
dim dbs as dao.database, rst as dao.recordset
set dbs=currentdb
set rst=dbs.openrecordset("SELECT * FROM MyTable")
rst.movefirst
if rst.fields("Enable")=false then application.quit
End Sub

in the Form_Timer() sub query the field's value created above. If it is False Application.Quit

in the Form_Load sub sub query the field's value created above (like in the Form_Timer sub). If it is False then Application.Quit

When you want users to quit change the Enable field's value of the first record False, or otherwise True

hope it helps you
ide
 
Interesting approach, ill give it a go the moment i can figure how to get everyone out in the first place without having to resort to violence or black majic

 
Thanks Ide, that seems to work fine i made a few alterations , mainly warnings and a back door way in,

If i ever find this USer thing i was mentioning ill post it

btw, good spookey effect when all the users in the office cant work out why it is "magically" shutting down ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top