Global Closing!!!!!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I ask this question a week ago but no one answer me with the answer.

How to close a form opened on other computer through network?

Let say i am the admin. When i press a close command button, Forms opened on
other computer through network will close.

Any ideas programmatically?

Thanks in advance.

Kennykee
 
kennykee said:
I ask this question a week ago but no one answer me with the answer.

How to close a form opened on other computer through network?

Let say i am the admin. When i press a close command button, Forms
opened on other computer through network will close.

Any ideas programmatically?

Thanks in advance.

Kennykee

Can't be done as far as I know. The form to be closed could be designed such
that it periodically checks for a value in a common table or the existence of a
file at a particular location and when it finds such closes itself. The button
on the other computer could be the mechanism that inserts this table value or
creates this file.
 
Thanks Rick and I understand what you are trying to tell me
I got an idea but do not know how to write the code

If a user does not typing or moving mouse for a certain time (idle), then it
closes it self.

May be it sounds like this:

On______

If (Idle time) > fixed time Then
Docmd.close
End If

Any ideas?

Thanks in advance.

kennykee
 
You'd need a hidden form with a timer event checking Screen.ActiveControl to
see if it is a different control or the value has changed. Still, this
could be problematic if the user was running/reviewing a report, query, or
whatever. There is no simple way to trap keystrokes or mouse movement
globally.

Rick's idea is the best way to go. So, basically, you'd have a hidden form
that periodically checks for a flag in a table...and if the condition is
met, you'd pop a form telling the user that you're shutting them down...the
pop up should close automatically after some interval...just in case the
user isn't there.
 
kennykee said:
Thanks Rick and I understand what you are trying to tell me
I got an idea but do not know how to write the code

If a user does not typing or moving mouse for a certain time (idle),
then it closes it self.

May be it sounds like this:

On______

If (Idle time) > fixed time Then
Docmd.close
End If

Any ideas?

I would Google these groups on "idle time" because it definitely has been
discussed. I am personally not familiar with how idle time is tracked as Access
has nothing built in that provides that.

What I was talking about was (for example) checking for the existence of a file
on the network...

If Dir("path to file") <> "" Then
DoCmd.Quit
End if

A form's Timer event could run this test every 30 seconds or so. From anywhere
on the network you could create the appropriate file at that particular location
and within 30 seconds that other app should shut itself down. Of course doing
it as abruptly as I am describing could cause real problems for the user and it
wouldn't work if they had a modal dialog displayed.
 
Create a table tblSystemValues in the backend

txtSystemValueName SHUTDOWN
txtSystemValueDescription Force shutdown of front-end databases
txtSystemValue -1
txtSystemValueDataType Boolean

Then create a form which is opened on startup and hidden. In the form's
onTimer event place code that checks the value in the txtSystemValue
field. If the value equals to true (-1), then execute code to shut down
the front-end. If you have multiple front-ends, you may want to go so
far as to create a table to document when each front-end is opened and
closed. The FE would update the openTime field at startup and then the
hidden form would update the closeTime field when closed. This isn't
guaranteed to work since it assumes a normal shutdown. If the PC is flat
out turned off or craps out, then the closeTime field wouldn't be updated.

David H
 
Thanks all. I will try first.
I have another question:
How to see name of users who are using certain form in current?
(user's name is the name registred on microsoft product or windows logon name)

Any ideas?

Thanks in advance.

Kennykee
 

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

Back
Top