Remotely disconnect users

J

JString

Hi.

I'm working on a DB for an office with about 15 employees. It's currently
split between a back end and front end that is set to auto-distribute. It's
a conversion job that started with their old Lotus Approach system so the
entire project is going to evolve for a while and the back end needs alot of
changes from time to time. This can be very annoying as it can be difficult
to get exclusive access to the back end when needed.

To solve this I developed a hidden form that resides in the front end that
is linked to a user table in the back end. Every few seconds the form checks
the user table for commands issued by the administrator using its timer
event. When a command is found, the front end will perform some action like
application.quit or display a message. It works great, but the only problem
is that the timer event of the form seems to lie dormant when the application
is minimized, so out of 15 employees theres always a few that don't close
down and I still have to go running around the office to take care of it.

So, the thing that I need to know is, is there any way to execute code while
access is minimized? Is the timer event inactive or is the form not
executing its code because it's not activated? What about data refresh?

Many thanks in advance.
 
R

Ron Weiner

I am pretty sure the timer is firing no matter what the access application
is doing. Unless of course the CPU has gone into some kind of low power or
hibernation mode. Here is what I did to test.

Created a new database. In startup options I set the "Application Title" to
"Test" to prevent a 3270 Prop not found error.

I created a new form. Set the forms timer to fire once a second. Added the
following code behind the form.

Option Compare Database
Option Explicit

Dim mintTimes As Integer
Dim mblnVisible As Boolean

Private Sub Form_Load()
mblnVisible = True
End Sub

Private Sub Form_Timer()
If mblnVisible Then
Me.Visible = False
mblnVisible = False
End If
mintTimes = mintTimes + 1
CurrentDb.Properties("AppTitle") = "timer fired " & mintTimes
Application.RefreshTitleBar
End Sub


No matter what I do the applications caption changes once a Second. This is
with Access 2K on WinXP. You might want to show us the code you are using

Rdub
 
J

JString

I did a little testing myself and you're right, the timer does fire. I think
it might be some quirk with the application.close method. I added this next
line right before the close event and it worked fine:

DoCmd.RunCommand acCmdAppRestore
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top