Close query automatically

  • Thread starter Thread starter Pierre
  • Start date Start date
P

Pierre

Hi all,

Suppose a user is working on a form and open a query by pushing a button.

The query open and the guy leave for the day.

I want to close the query automatically if the user dont move the mouse for
15 minutes.

I do that with timer and mouse events from the form used to start the query.

My question: Is there a way to cylcle throug open objects on the screen?

With the forms collection i am able to spot and close all forms that the
user has open.

But with the query i don t know what to do.

regards,

pierre
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If you have the IsLoaded function from the Northwind sample db you can
do this (Access 2002):

Dim qd As QueryDef
For Each qd In CurrentDb.QueryDefs
If isLoaded(qd.Name, acQuery) Then
DoCmd.Close acQuery, qd.Name
End If
Next

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQlbGYYechKqOuFEgEQKG9ACguVZYGHATB02TznImqPAYRLce+KkAoPAp
PYkazkZaRk0IG2DREOR1xdBB
=E+EH
-----END PGP SIGNATURE-----
 
Back
Top