Three ways to force a user out of database by Niel

J

John

Hi everyone,

I encountered some problems and confusions while following the step by step
proccess using the "force a user out" to incorporate into my Access XP
database.
Just to give a little light on how my database is designed: I don't have any
front end and back end options for the users. They simply share the database
thru a shared network drive (no splits yet).

There are 4 steps to follow to complete the process.

1. Place the table "tblUserPreferences" in your back end and link to it
from your front end.
Ok, I imported "tbleUserPreferences" table into my database. However, how
do I link it?? do I ignore it, since I don't have front end??

2. Part instructs to import the three forms: "frmDatabaseAdministration",
"frmForceUserOut" and "frmNotifyUser" into my front end.
I think I did this part fine by simply importing them.

3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

After this I should be able to make this run correct? Can you please also
tell me how I can test it on a shared network?? Thank you for your time.

John
 
T

Tom Wickerath

Hi John,

It would be helpful if you can provide a reference for the method that you
are using. Are you getting this from an on-line source, from an Access book,
etc. That way, if someone has the same reference material available, they can
take a better look at the issue for you. I have used the method shown in this
KB article with success:

HOW TO: Detect User Idle Time or Inactivity in Access 2000
http://support.microsoft.com/?id=210297

However, I replaced the code in one subroutine, as follows:

Sub IdleTimeDetected(sngExpiredMinutes)
'Dim strMessage As String
'strMessage = "No user activity detected in the last" & vbCrLf
'strMessage = strMessage & sngExpiredMinutes & " minute(s)!"
'MsgBox strMessage, vbInformation, "No Sign of Activity!"
Application.Quit acSaveYes
End Sub


Arvin Meyer has a sample available here:
http://www.datastrat.com/Download2.html

Look for KickEmOff2K - Demo of Kick Em Off Code

Just to give a little light on how my database is designed: I don't have
any front end and back end options for the users. They simply share the
database thru a shared network drive (no splits yet).

You really should split your database. Sharing an entire database on the
network has been identified by Microsoft personnel as the # 1 cause of
corruption in Access.

1.) > Ok, I imported "tbleUserPreferences" table into my database. However,
how do I link it?? do I ignore it, since I don't have front end??

Linking is used in reference to a split database. You should not ignore it.
Instead, you should split your database.

2.) > I think I did this part fine by simply importing them.
Sounds right.

3.) > 3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

Was your switchboard created using the switchboard wizard? If so, you
already have a Form_Open event procedure, so you would add those lines of
code to the existing procedure. If you did not already have a Form_Open event
procedure, then as soon as you clicked on the build button (the button with
the three dots), you should have seen your mouse cursor positioned within
these two lines of code:

Private Sub Form_Open(Cancel As Integer)
<--blinking cursor here
End Sub

Copy the three lines of code and paste them in-between the Private Sub
Form_Open and End Sub lines. Then click on Debug > Compile DatabaseName to
verify that your code compiles okay.


Tom
__________________________________________

:

Hi everyone,

I encountered some problems and confusions while following the step by step
process using the "force a user out" to incorporate into my Access XP
database.
Just to give a little light on how my database is designed: I don't have any
front end and back end options for the users. They simply share the database
thru a shared network drive (no splits yet).

There are 4 steps to follow to complete the process.

1. Place the table "tblUserPreferences" in your back end and link to it
from your front end.
Ok, I imported "tbleUserPreferences" table into my database. However, how
do I link it?? do I ignore it, since I don't have front end??

2. Part instructs to import the three forms: "frmDatabaseAdministration",
"frmForceUserOut" and "frmNotifyUser" into my front end.
I think I did this part fine by simply importing them.

3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

After this I should be able to make this run correct? Can you please also
tell me how I can test it on a shared network?? Thank you for your time.

John
 
J

John

Hi Tom,

My question is refering to the "Force user Out" located:
http://propertychampion.com/Developer_Tools/Addins/Addins.html

Regards..

John

Tom Wickerath said:
Hi John,

It would be helpful if you can provide a reference for the method that you
are using. Are you getting this from an on-line source, from an Access book,
etc. That way, if someone has the same reference material available, they can
take a better look at the issue for you. I have used the method shown in this
KB article with success:

HOW TO: Detect User Idle Time or Inactivity in Access 2000
http://support.microsoft.com/?id=210297

However, I replaced the code in one subroutine, as follows:

Sub IdleTimeDetected(sngExpiredMinutes)
'Dim strMessage As String
'strMessage = "No user activity detected in the last" & vbCrLf
'strMessage = strMessage & sngExpiredMinutes & " minute(s)!"
'MsgBox strMessage, vbInformation, "No Sign of Activity!"
Application.Quit acSaveYes
End Sub


Arvin Meyer has a sample available here:
http://www.datastrat.com/Download2.html

Look for KickEmOff2K - Demo of Kick Em Off Code

Just to give a little light on how my database is designed: I don't have
any front end and back end options for the users. They simply share the
database thru a shared network drive (no splits yet).

You really should split your database. Sharing an entire database on the
network has been identified by Microsoft personnel as the # 1 cause of
corruption in Access.

1.) > Ok, I imported "tbleUserPreferences" table into my database. However,
how do I link it?? do I ignore it, since I don't have front end??

Linking is used in reference to a split database. You should not ignore it.
Instead, you should split your database.

2.) > I think I did this part fine by simply importing them.
Sounds right.

3.) > 3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

Was your switchboard created using the switchboard wizard? If so, you
already have a Form_Open event procedure, so you would add those lines of
code to the existing procedure. If you did not already have a Form_Open event
procedure, then as soon as you clicked on the build button (the button with
the three dots), you should have seen your mouse cursor positioned within
these two lines of code:

Private Sub Form_Open(Cancel As Integer)
<--blinking cursor here
End Sub

Copy the three lines of code and paste them in-between the Private Sub
Form_Open and End Sub lines. Then click on Debug > Compile DatabaseName to
verify that your code compiles okay.


Tom
__________________________________________

:

Hi everyone,

I encountered some problems and confusions while following the step by step
process using the "force a user out" to incorporate into my Access XP
database.
Just to give a little light on how my database is designed: I don't have any
front end and back end options for the users. They simply share the database
thru a shared network drive (no splits yet).

There are 4 steps to follow to complete the process.

1. Place the table "tblUserPreferences" in your back end and link to it
from your front end.
Ok, I imported "tbleUserPreferences" table into my database. However, how
do I link it?? do I ignore it, since I don't have front end??

2. Part instructs to import the three forms: "frmDatabaseAdministration",
"frmForceUserOut" and "frmNotifyUser" into my front end.
I think I did this part fine by simply importing them.

3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

After this I should be able to make this run correct? Can you please also
tell me how I can test it on a shared network?? Thank you for your time.

John
 
T

Tom Wickerath

Hi John,

Thanks for providing the link. I will take a look at this later tonight. I'm
just getting ready to leave for work now. Did my other answers help you
answer your questions?

Tom
__________________________________________

:

Hi Tom,

My question is refering to the "Force user Out" located:
http://propertychampion.com/Developer_Tools/Addins/Addins.html

Regards..

John
__________________________________________

:

Hi John,

It would be helpful if you can provide a reference for the method that you
are using. Are you getting this from an on-line source, from an Access book,
etc. That way, if someone has the same reference material available, they can
take a better look at the issue for you. I have used the method shown in this
KB article with success:

HOW TO: Detect User Idle Time or Inactivity in Access 2000
http://support.microsoft.com/?id=210297

However, I replaced the code in one subroutine, as follows:

Sub IdleTimeDetected(sngExpiredMinutes)
'Dim strMessage As String
'strMessage = "No user activity detected in the last" & vbCrLf
'strMessage = strMessage & sngExpiredMinutes & " minute(s)!"
'MsgBox strMessage, vbInformation, "No Sign of Activity!"
Application.Quit acSaveYes
End Sub


Arvin Meyer has a sample available here:
http://www.datastrat.com/Download2.html

Look for KickEmOff2K - Demo of Kick Em Off Code

Just to give a little light on how my database is designed: I don't have
any front end and back end options for the users. They simply share the
database thru a shared network drive (no splits yet).

You really should split your database. Sharing an entire database on the
network has been identified by Microsoft personnel as the # 1 cause of
corruption in Access.

1.) > Ok, I imported "tbleUserPreferences" table into my database. However,
how do I link it?? do I ignore it, since I don't have front end??

Linking is used in reference to a split database. You should not ignore it.
Instead, you should split your database.

2.) > I think I did this part fine by simply importing them.
Sounds right.

3.) > 3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

Was your switchboard created using the switchboard wizard? If so, you
already have a Form_Open event procedure, so you would add those lines of
code to the existing procedure. If you did not already have a Form_Open event
procedure, then as soon as you clicked on the build button (the button with
the three dots), you should have seen your mouse cursor positioned within
these two lines of code:

Private Sub Form_Open(Cancel As Integer)
<--blinking cursor here
End Sub

Copy the three lines of code and paste them in-between the Private Sub
Form_Open and End Sub lines. Then click on Debug > Compile DatabaseName to
verify that your code compiles okay.


Tom
__________________________________________

:

Hi everyone,

I encountered some problems and confusions while following the step by step
process using the "force a user out" to incorporate into my Access XP
database.
Just to give a little light on how my database is designed: I don't have any
front end and back end options for the users. They simply share the database
thru a shared network drive (no splits yet).

There are 4 steps to follow to complete the process.

1. Place the table "tblUserPreferences" in your back end and link to it
from your front end.
Ok, I imported "tbleUserPreferences" table into my database. However, how
do I link it?? do I ignore it, since I don't have front end??

2. Part instructs to import the three forms: "frmDatabaseAdministration",
"frmForceUserOut" and "frmNotifyUser" into my front end.
I think I did this part fine by simply importing them.

3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

After this I should be able to make this run correct? Can you please also
tell me how I can test it on a shared network?? Thank you for your time.

John
 
J

John

Unfortunately I couldn't use your prior answer because it's slightly
different than what I'm looking for. I simply want to boot or force off any
access user. But, I’ll wait for your response tonight regards to the link I
provided. Thanks Tom.

John


Tom Wickerath said:
Hi John,

Thanks for providing the link. I will take a look at this later tonight. I'm
just getting ready to leave for work now. Did my other answers help you
answer your questions?

Tom
__________________________________________

:

Hi Tom,

My question is refering to the "Force user Out" located:
http://propertychampion.com/Developer_Tools/Addins/Addins.html

Regards..

John
__________________________________________

:

Hi John,

It would be helpful if you can provide a reference for the method that you
are using. Are you getting this from an on-line source, from an Access book,
etc. That way, if someone has the same reference material available, they can
take a better look at the issue for you. I have used the method shown in this
KB article with success:

HOW TO: Detect User Idle Time or Inactivity in Access 2000
http://support.microsoft.com/?id=210297

However, I replaced the code in one subroutine, as follows:

Sub IdleTimeDetected(sngExpiredMinutes)
'Dim strMessage As String
'strMessage = "No user activity detected in the last" & vbCrLf
'strMessage = strMessage & sngExpiredMinutes & " minute(s)!"
'MsgBox strMessage, vbInformation, "No Sign of Activity!"
Application.Quit acSaveYes
End Sub


Arvin Meyer has a sample available here:
http://www.datastrat.com/Download2.html

Look for KickEmOff2K - Demo of Kick Em Off Code

Just to give a little light on how my database is designed: I don't have
any front end and back end options for the users. They simply share the
database thru a shared network drive (no splits yet).

You really should split your database. Sharing an entire database on the
network has been identified by Microsoft personnel as the # 1 cause of
corruption in Access.

1.) > Ok, I imported "tbleUserPreferences" table into my database. However,
how do I link it?? do I ignore it, since I don't have front end??

Linking is used in reference to a split database. You should not ignore it.
Instead, you should split your database.

2.) > I think I did this part fine by simply importing them.
Sounds right.

3.) > 3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

Was your switchboard created using the switchboard wizard? If so, you
already have a Form_Open event procedure, so you would add those lines of
code to the existing procedure. If you did not already have a Form_Open event
procedure, then as soon as you clicked on the build button (the button with
the three dots), you should have seen your mouse cursor positioned within
these two lines of code:

Private Sub Form_Open(Cancel As Integer)
<--blinking cursor here
End Sub

Copy the three lines of code and paste them in-between the Private Sub
Form_Open and End Sub lines. Then click on Debug > Compile DatabaseName to
verify that your code compiles okay.


Tom
__________________________________________

:

Hi everyone,

I encountered some problems and confusions while following the step by step
process using the "force a user out" to incorporate into my Access XP
database.
Just to give a little light on how my database is designed: I don't have any
front end and back end options for the users. They simply share the database
thru a shared network drive (no splits yet).

There are 4 steps to follow to complete the process.

1. Place the table "tblUserPreferences" in your back end and link to it
from your front end.
Ok, I imported "tbleUserPreferences" table into my database. However, how
do I link it?? do I ignore it, since I don't have front end??

2. Part instructs to import the three forms: "frmDatabaseAdministration",
"frmForceUserOut" and "frmNotifyUser" into my front end.
I think I did this part fine by simply importing them.

3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

After this I should be able to make this run correct? Can you please also
tell me how I can test it on a shared network?? Thank you for your time.

John
 
T

Tom Wickerath

Hi John,

In what way is my answer slightly different than what you are looking for,
other than splitting the database? Splitting your application into a
front-end (FE) and back-end (BE) databases is a pre-requisite for a
multi-user Access database. You *really* should do this. Trust me on that.

Each user should have their own copy of the FE database installed to their
local hard drive. The BE database, which includes only tables with the shared
data, is placed on the file server. I honestly do not think it is possible to
implement the ability to boot off a given user with a shared database, when
everyone is sharing the entire database. Think about it...if it shuts down
for one user, it shuts down for all users.

I took a look at this sample. The directions include one step that you did
not mention in your initial message. Step 5 includes the following
instruction:

"Also you will need to place a linked table name in the
function "Find_Current_BE_Location". This will allow the
program to determine where your BE's lock file is located."

The "Find_Current_BE_Location" function is found in the code module
associated with the frmDatabaseAdministration form. Here is the comment line,
with the line of code that you need to modify:

' Place a table name in the next line that is a linked table.
CourtConnection = CurrentDb.TableDefs("tblCity").Connect

If you happen to have a table named tblCity, then great. Otherwise, replace
this value with the name of an existing linked table. This code simply will
not work unless you specify a LINKED table, which means that you need to
split the database. The reason is that local tables do not include a .Connect
string. Thus, the string variable CourtConnection would be null.

The Form_Open event procedure of frmDatabaseAdministration includes a call
to the subroutine named "btnTest_Click":

Call btnTest_Click

This subroutine includes the following line of code:

DB_BE_Path_And_Name = Find_Current_BE_Location

which causes the above mentioned Find_Current_BE_Location function to be
run. The next line of code in the btnTest_Click procedure:

DB_BE_LockFile = Left$(DB_BE_Path_And_Name$, Len(DB_BE_Path_And_Name) - 4)

would result in a null, since you have not back-end database until you split
your database. With enough time, the necessary modifications could be made
to this code to run in a local database. If you are using Access 2000 or
higher, you can get the path by using CurrentProject.Path. Then, you would
use the replace function (Access 2000 & higher) to replace the string ".mdb"
with the string ".ldb".

You won't need to do all these modifications to the code, if you will simply
split your database!

Tom
__________________________________________

:

Unfortunately I couldn't use your prior answer because it's slightly
different than what I'm looking for. I simply want to boot or force off any
access user. But, I’ll wait for your response tonight regards to the link I
provided. Thanks Tom.

John
__________________________________________

:

Hi John,

Thanks for providing the link. I will take a look at this later tonight. I'm
just getting ready to leave for work now. Did my other answers help you
answer your questions?

Tom
__________________________________________

:

Hi Tom,

My question is refering to the "Force user Out" located:
http://propertychampion.com/Developer_Tools/Addins/Addins.html

Regards..

John
__________________________________________

:

Hi John,

It would be helpful if you can provide a reference for the method that you
are using. Are you getting this from an on-line source, from an Access book,
etc. That way, if someone has the same reference material available, they can
take a better look at the issue for you. I have used the method shown in this
KB article with success:

HOW TO: Detect User Idle Time or Inactivity in Access 2000
http://support.microsoft.com/?id=210297

However, I replaced the code in one subroutine, as follows:

Sub IdleTimeDetected(sngExpiredMinutes)
'Dim strMessage As String
'strMessage = "No user activity detected in the last" & vbCrLf
'strMessage = strMessage & sngExpiredMinutes & " minute(s)!"
'MsgBox strMessage, vbInformation, "No Sign of Activity!"
Application.Quit acSaveYes
End Sub


Arvin Meyer has a sample available here:
http://www.datastrat.com/Download2.html

Look for KickEmOff2K - Demo of Kick Em Off Code

Just to give a little light on how my database is designed: I don't have
any front end and back end options for the users. They simply share the
database thru a shared network drive (no splits yet).

You really should split your database. Sharing an entire database on the
network has been identified by Microsoft personnel as the # 1 cause of
corruption in Access.

1.) > Ok, I imported "tbleUserPreferences" table into my database. However,
how do I link it?? do I ignore it, since I don't have front end??

Linking is used in reference to a split database. You should not ignore it.
Instead, you should split your database.

2.) > I think I did this part fine by simply importing them.
Sounds right.

3.) > 3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

Was your switchboard created using the switchboard wizard? If so, you
already have a Form_Open event procedure, so you would add those lines of
code to the existing procedure. If you did not already have a Form_Open event
procedure, then as soon as you clicked on the build button (the button with
the three dots), you should have seen your mouse cursor positioned within
these two lines of code:

Private Sub Form_Open(Cancel As Integer)
<--blinking cursor here
End Sub

Copy the three lines of code and paste them in-between the Private Sub
Form_Open and End Sub lines. Then click on Debug > Compile DatabaseName to
verify that your code compiles okay.


Tom
__________________________________________

:

Hi everyone,

I encountered some problems and confusions while following the step by step
process using the "force a user out" to incorporate into my Access XP
database.
Just to give a little light on how my database is designed: I don't have any
front end and back end options for the users. They simply share the database
thru a shared network drive (no splits yet).

There are 4 steps to follow to complete the process.

1. Place the table "tblUserPreferences" in your back end and link to it
from your front end.
Ok, I imported "tbleUserPreferences" table into my database. However, how
do I link it?? do I ignore it, since I don't have front end??

2. Part instructs to import the three forms: "frmDatabaseAdministration",
"frmForceUserOut" and "frmNotifyUser" into my front end.
I think I did this part fine by simply importing them.

3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

After this I should be able to make this run correct? Can you please also
tell me how I can test it on a shared network?? Thank you for your time.

John
 
J

John

Hi Tom,

Thank you for all that great explanation. I took your word and attempted to
split my database by using the wizard in Access 2002. I encountered this
error message "subscript out of range", and I clicked the ok button and I got
another message "Invalid procedure call or argument". What did I do wrong?

John

Tom Wickerath said:
Hi John,

In what way is my answer slightly different than what you are looking for,
other than splitting the database? Splitting your application into a
front-end (FE) and back-end (BE) databases is a pre-requisite for a
multi-user Access database. You *really* should do this. Trust me on that.

Each user should have their own copy of the FE database installed to their
local hard drive. The BE database, which includes only tables with the shared
data, is placed on the file server. I honestly do not think it is possible to
implement the ability to boot off a given user with a shared database, when
everyone is sharing the entire database. Think about it...if it shuts down
for one user, it shuts down for all users.

I took a look at this sample. The directions include one step that you did
not mention in your initial message. Step 5 includes the following
instruction:

"Also you will need to place a linked table name in the
function "Find_Current_BE_Location". This will allow the
program to determine where your BE's lock file is located."

The "Find_Current_BE_Location" function is found in the code module
associated with the frmDatabaseAdministration form. Here is the comment line,
with the line of code that you need to modify:

' Place a table name in the next line that is a linked table.
CourtConnection = CurrentDb.TableDefs("tblCity").Connect

If you happen to have a table named tblCity, then great. Otherwise, replace
this value with the name of an existing linked table. This code simply will
not work unless you specify a LINKED table, which means that you need to
split the database. The reason is that local tables do not include a .Connect
string. Thus, the string variable CourtConnection would be null.

The Form_Open event procedure of frmDatabaseAdministration includes a call
to the subroutine named "btnTest_Click":

Call btnTest_Click

This subroutine includes the following line of code:

DB_BE_Path_And_Name = Find_Current_BE_Location

which causes the above mentioned Find_Current_BE_Location function to be
run. The next line of code in the btnTest_Click procedure:

DB_BE_LockFile = Left$(DB_BE_Path_And_Name$, Len(DB_BE_Path_And_Name) - 4)

would result in a null, since you have not back-end database until you split
your database. With enough time, the necessary modifications could be made
to this code to run in a local database. If you are using Access 2000 or
higher, you can get the path by using CurrentProject.Path. Then, you would
use the replace function (Access 2000 & higher) to replace the string ".mdb"
with the string ".ldb".

You won't need to do all these modifications to the code, if you will simply
split your database!

Tom
__________________________________________

:

Unfortunately I couldn't use your prior answer because it's slightly
different than what I'm looking for. I simply want to boot or force off any
access user. But, I’ll wait for your response tonight regards to the link I
provided. Thanks Tom.

John
__________________________________________

:

Hi John,

Thanks for providing the link. I will take a look at this later tonight. I'm
just getting ready to leave for work now. Did my other answers help you
answer your questions?

Tom
__________________________________________

:

Hi Tom,

My question is refering to the "Force user Out" located:
http://propertychampion.com/Developer_Tools/Addins/Addins.html

Regards..

John
__________________________________________

:

Hi John,

It would be helpful if you can provide a reference for the method that you
are using. Are you getting this from an on-line source, from an Access book,
etc. That way, if someone has the same reference material available, they can
take a better look at the issue for you. I have used the method shown in this
KB article with success:

HOW TO: Detect User Idle Time or Inactivity in Access 2000
http://support.microsoft.com/?id=210297

However, I replaced the code in one subroutine, as follows:

Sub IdleTimeDetected(sngExpiredMinutes)
'Dim strMessage As String
'strMessage = "No user activity detected in the last" & vbCrLf
'strMessage = strMessage & sngExpiredMinutes & " minute(s)!"
'MsgBox strMessage, vbInformation, "No Sign of Activity!"
Application.Quit acSaveYes
End Sub


Arvin Meyer has a sample available here:
http://www.datastrat.com/Download2.html

Look for KickEmOff2K - Demo of Kick Em Off Code

Just to give a little light on how my database is designed: I don't have
any front end and back end options for the users. They simply share the
database thru a shared network drive (no splits yet).

You really should split your database. Sharing an entire database on the
network has been identified by Microsoft personnel as the # 1 cause of
corruption in Access.

1.) > Ok, I imported "tbleUserPreferences" table into my database. However,
how do I link it?? do I ignore it, since I don't have front end??

Linking is used in reference to a split database. You should not ignore it.
Instead, you should split your database.

2.) > I think I did this part fine by simply importing them.
Sounds right.

3.) > 3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

Was your switchboard created using the switchboard wizard? If so, you
already have a Form_Open event procedure, so you would add those lines of
code to the existing procedure. If you did not already have a Form_Open event
procedure, then as soon as you clicked on the build button (the button with
the three dots), you should have seen your mouse cursor positioned within
these two lines of code:

Private Sub Form_Open(Cancel As Integer)
<--blinking cursor here
End Sub

Copy the three lines of code and paste them in-between the Private Sub
Form_Open and End Sub lines. Then click on Debug > Compile DatabaseName to
verify that your code compiles okay.


Tom
__________________________________________

:

Hi everyone,

I encountered some problems and confusions while following the step by step
process using the "force a user out" to incorporate into my Access XP
database.
Just to give a little light on how my database is designed: I don't have any
front end and back end options for the users. They simply share the database
thru a shared network drive (no splits yet).

There are 4 steps to follow to complete the process.

1. Place the table "tblUserPreferences" in your back end and link to it
from your front end.
Ok, I imported "tbleUserPreferences" table into my database. However, how
do I link it?? do I ignore it, since I don't have front end??

2. Part instructs to import the three forms: "frmDatabaseAdministration",
"frmForceUserOut" and "frmNotifyUser" into my front end.
I think I did this part fine by simply importing them.

3. In the On_Open Event of your Switchboard place the following Code.
Dim stDocName As String

stDocName = "frmNotifyUser"
DoCmd.OpenForm stDocName,,,,, acHidden

Here again I got stuck. I have a switchboard, and I click the design button
to click the on_open event. I did select the [Event Procedure] and clicked
the ... build button to type the above code. I don't know where and if I
should type all exactly the same as it appears??

After this I should be able to make this run correct? Can you please also
tell me how I can test it on a shared network?? Thank you for your time.

John
 
T

Tom Wickerath

Hi John,

Most likely, you didn't do anything wrong that should have caused such an
error message. Here is a KB article for Access 2000, which likely applies as
well to later versions of Access:

Resetting Code in Visual Basic Editor Causes Problems with Wizards
http://support.microsoft.com/?id=223229

It sounded like it might describe your situation, but I could not reproduce
the same error, by substituting the database splitter wizard for step 2 in
the Steps to Reproduce Behavior section. Instead, I received a different
error message.

Try making a copy of any other Access database on your PC that is not
already split. If you use the database splitter wizard on this copy, do you
receive the same error message? If so, it sounds like you have a problem with
at least one wizard file on your system.

You can always split your database manually, without the help of the wizard.
Start by making two copies. Use an identifier in the name of each database to
help identify back-end versus front-end. For example, your two copies might
be named:

MyDatabase_FE.mdb and MyDatabase_BE.mdb

Open the back-end (_BE) database. Delete all queries, forms, reports,
macros, modules and data access pages, leaving only the tables. Disable Name
Autocorrect. It is suggested that you also set subdatasheets to None in all
tables. Do a compact and repair (Tools > Database Utilities > Compact and
Repair Database...). Close the BE database.

Open the front-end (_FE) database. Delete all tables that are intended to
store shared data. You can leave local tables that have relatively static
data, such as a list of states, for example. Disable Name Autocorrect. Do a
compact and repair. Now, use File > Get External Data > Linked Tables... If
you are in the office right now, you may want to first copy the BE database
to the file server folder where you intend for it to be located. That way,
you won't need to relink later on.

Navigate to the folder where your new BE database is saved to. Select the
database. Then select all tables within this database. The end result that
you should see is little black arrows pointing to the right next to each
table name. This indicates a linked table.

Here is more information on why I advised to disable Name Autocorrect, and
set subdatasheets to None:

Slow performance when user opens an object with Name AutoCorrect enabled in
Microsoft Access
http://support.microsoft.com/kb/290181/EN-US/

BUG: Slow performance on linked tables in Access 2002 and Office Access 2003
http://support.microsoft.com/kb/275085/

There are other steps that you should take, when implementing a multi-user
Access database, such as opening a persistant recordset. For now, let's just
concentrate on getting this much to work.

Tom
___________________________________________

:

Hi Tom,

Thank you for all that great explanation. I took your word and attempted to
split my database by using the wizard in Access 2002. I encountered this
error message "subscript out of range", and I clicked the ok button and I got
another message "Invalid procedure call or argument". What did I do wrong?

John
 
J

John

Hi Tom,

First - Thank you for your time.

Second - I managed to fix the error problem by simply importing all the
objects including the modules from my old database to a new blank database.
That enabled me to use the split database wizard successfully :) I named one
database FC-edition_BE and the other FC-edition_FE. I do see all the arrows
next to the tables indicating the links. So here is my next question. O and
also, I did all that offline (at home).

You mentioned:
If you are in the office right now, you may want to first copy the BE
database
To the file server folder where you intend for it to be located. That way,
You won't need to relink later on.

1. How can I relink them once I go back to the office?
Or should I just simply do the splitting again, but this time specify the
paths? I don't mind doing it again. Its a very simple process.

2. Can you please explain in detail of the process I should take to
transferring the BE database and FE? All the staffs have access 2002
installed on their computers. They all have access to the network share
drives. Assuming the drive letter is B. What steps can I take to
successfully transfer the two databases? I do realize that the BE should be
on the network drive B. Is it ok for me to manually go to each individual
station and paste a copy of the FE to their desktop (example)?

3. Security: Now, if I want to start using the security wizard to assign
permissions and rights. Should I do this on the server with the BE database?
And would the users be able to see to login window once they attempt to open
their FE database?

I will stop here and let you take a break to answer these questions. Tom,
your help and support is greatly appreciated.
 
T

Tom Wickerath

Hi John,
First - Thank you for your time.
You're welcome.
Second - I managed to fix the error problem...
That's great!
1. How can I relink them once I go back to the office?
You will need to use the Linked Table Manager (Tools > Database Utilities >
Linked Table Manager). Click the Select All button to select all linked
tables. Place a check in the box in the lower left corner, which reads:
"Always prompt for new location". Then click on the OK button.

Instead of simply browsing to the shared folder (B:\ in your example), I
recommend entering the UNC (Uniform Naming Convention) path instead. This
will look something like this:

\\server\share\FC-edition_BE.mdb

You may, of course, have additional folders in-between the \share and the
\FC-edition_BE.mdb. You should try to keep this path as short as possible. It
is best if the length of any given folder name does not exceed 8 characters.
If you choose to use the mapped drive location (ie. B:\ ), instead of the UNC
form, then all of your users will have to have this shared folder mapped the
same way. That's usually more problematic, versus just using the UNC form.
Relinking is also a very simple process. Once you get more advanced in
Access, you can even use code to automatically re-link tables in the event
that the front-end cannot find the back-end, when the database is started. If
you care to send me a private e-mail message, I will share this code with
you, but I won't post it in the newsgroups.

2. Can you please explain in detail of the process I should take to
transferring the BE database and FE? ....They all have access to the
network share drives.
Good. Each user needs to have R, W, C, D (Read, Write, Create and Delete)
privleges on the folder. You can assign read-only privleges to the actual BE
..mdb file, if you want specific people to not have edit capabilities. I
refer you to the following KB article:

Introduction to .ldb files
http://support.microsoft.com/?id=299373

Is it ok for me to manually go to each individual station and paste
a copy of the FE to their desktop (example)?
Sure. Or send each user a copy by e-mail (after using the re-linking wizard
to reset the linked tables). You can also send your user's a link to a shared
folder that contains the FE .mdb file, however, my experience is that even if
you tell them to copy the file to their local hard drive, they will simply
double-click it and run it from the network. That puts you back in the
original situation of sharing the entire database, which is definately not
recommended.
3. Security: Now, if I want to start using the security wizard to assign
permissions and rights. Should I do this on the server with the BE database?
Yes. You will also need to put a copy of the workgroup information file
(*.mdw) in the shared folder, and create a shortcut for each user so that it
includes the path to the .mdw file. If you are going to do this, then I would
place a shortcut on each user's desktop, but install the actual database file
to a shared folder on each workstation (for example,
C:\FC_DB\FC-edition_FE.mdb), especially if a workstation is shared.
And would the users be able to see to login window once they attempt
to open their FE database?
Yes.

A word of warning about Access Security. It is not very secure at all. There
are free tools available for download on the internet, which can break the
best Access security in a matter of seconds. No kidding.

Your best bet is to rely on Windows Security for access to the shared folder
only by those who have a legitimate need. You can use security to help honest
people to only see what they should see, but please don't be under any
illusions that your database is "secure" because you used Access security. It
simply ain't so. This is not the fault of Microsoft. In fact, it is
impossible to provide good security for any file-based system. If you need
good security, above and beyond what Windows security provides, then you need
to look into using a true client/server back-end database, such as SQL Server
or Oracle. Access is a file-based system.

If my answer has helped you, please answer yes to the question that reads
"Did this post answer the question?" at the bottom of the message thread.


Tom

QWaos168@XScom cast. Dnet (<--Remove all capitolized letters and spaces).

http://www.access.qbuilt.com/html/expert_contributors.html
_______________________________

:

Hi Tom,

First - Thank you for your time.

Second - I managed to fix the error problem by simply importing all the
objects including the modules from my old database to a new blank database.
That enabled me to use the split database wizard successfully :) I named one
database FC-edition_BE and the other FC-edition_FE. I do see all the arrows
next to the tables indicating the links. So here is my next question. O and
also, I did all that offline (at home).

You mentioned:
If you are in the office right now, you may want to first copy the BE
database
To the file server folder where you intend for it to be located. That way,
You won't need to relink later on.

1. How can I relink them once I go back to the office?
Or should I just simply do the splitting again, but this time specify the
paths? I don't mind doing it again. Its a very simple process.

2. Can you please explain in detail of the process I should take to
transferring the BE database and FE? All the staffs have access 2002
installed on their computers. They all have access to the network share
drives. Assuming the drive letter is B. What steps can I take to
successfully transfer the two databases? I do realize that the BE should be
on the network drive B. Is it ok for me to manually go to each individual
station and paste a copy of the FE to their desktop (example)?

3. Security: Now, if I want to start using the security wizard to assign
permissions and rights. Should I do this on the server with the BE database?
And would the users be able to see to login window once they attempt to open
their FE database?

I will stop here and let you take a break to answer these questions. Tom,
your help and support is greatly appreciated.
 
J

Joan Wild

Tom Wickerath said:
Instead of simply browsing to the shared folder (B:\ in your example), I
recommend entering the UNC (Uniform Naming Convention) path instead. This
will look something like this:

\\server\share\FC-edition_BE.mdb

Just to add... Use Network Neighborhood to locate the backend, and it will
use UNC for you.
Once you get more advanced in
Access, you can even use code to automatically re-link tables in the event
that the front-end cannot find the back-end, when the database is started.

You'll find sample code to do this at www.mvps.org/access under the Tables
section.
Look for Reconnect Linked Access Tables from Code.
Yes. You will also need to put a copy of the workgroup information file
(*.mdw) in the shared folder, and create a shortcut for each user so that
it
includes the path to the .mdw file. If you are going to do this, then I
would
place a shortcut on each user's desktop, but install the actual database
file
to a shared folder on each workstation (for example,
C:\FC_DB\FC-edition_FE.mdb), especially if a workstation is shared.
Yes.

Not quite. You would also need to secure the frontend, using the same
workgroup file as was used for the backend. As for the shortcut on their
workstation, it would require the following in the target to specify the mdw
to use for that session.
"path to msaccess.exe" "path to frontend" /wrkgrp "path to secure mdw"
As Tom indicated, if you put the frontend in the same location on everyone's
workstation, then you can likely distribute the same shortcut to everyone,
providing Access was installed to the same location on their computers.
Also you can use a UNC pathname for the secure mdw on the server and avoid
the problems with mapped drives.
 
J

John

Hi Tom,


This morning I came to my office to paste a copy of the BE into the shared
drive and FE to the desktop from my memory stick. I encountered a problem
with the path when I attempted to open the FE database. I was able to open
the BE, but did not see any Linked tables anymore. I kinda have an idea why.
It's because I did it at home. But my question is what I can do to resolve
this issue. Meaning, what can I do to change the path? Or should I just
re-split the database??

Question Two. You mentioned something about UNC. Can you please in details
explain how I can do this? Meaning step by step process. Just to give you
an idea, I will be putting my BE database into a shared drive in exchange
server. All staff will have access to it. However, they will have to go
thru two or three folders to reach the BE database. So, I'm asking for a
step by step process of using the UNC method in my case. Thank you Tom and
Joan.


John
 
J

Joan Wild

John said:
Hi Tom,


This morning I came to my office to paste a copy of the BE into the shared
drive and FE to the desktop from my memory stick. I encountered a problem
with the path when I attempted to open the FE database.

It would tell you that it can't find the backend (which makes sense since
you moved it from another machine)
I was able to open
the BE, but did not see any Linked tables anymore.

Linked tables aren't in the BE, they're in the FE. Open the frontend, and
dismiss the message. Then go to Tools, Database Utilities, Linked Table
Manager. Select all the tables, put a check in the lower left. Then
locate, using Network Neighborhood, the backend on the server. That will
automatically use UNC pathnames for the links.

Once this FE has been relinked to the backend, just copy it to your users
(they won't have to do any linking to the backend, since this FE already has
the links in it).
 
J

John

I don't have the option to click Linked table manager in the FE. The option
is active (dimmed). ???
 
Top