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

Booting Users from Access

Status
Not open for further replies.

nanohurtz

Programmer
Mar 25, 2002
15
US
Is there a code that gracefully kills the .ldb instance that appears when a user is in Access. Or in otherwords kicks the user out. I have a script that will resync, lockdown and compress an .mdb. Only problem is that users will forget they have the app open when it's time to do maintenance and the script blows up.

-SubCon
 
set up a table called Mytable have one column in it set up as a bollean and call it "Kick out"

Create a form and call it frmsecretboot. on the start up get this form to load and hide it or make it really small , before loading any of your other forms.

on the timer evernt on the frmsecretboot have some code like this

dim myrec as recordset
dim mydb as database

set mydb = currentdatabase()
set myrec = mydb.openrecordset("Mytable")

myrec.movefirst

if myrec![Kick out] = true then

application.close
end if

all u have to do then is when you want to kick users out tick the box in the table , dont forget to put some sort of bypass in your code and to set the timer on the form


Chance


 
this is some thing i wa just thinking about... what do you mean by puting in a bypass?

--Junior JHauge@jmjpc.net
Life is change. To deny change is to deny life.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top