help with closing this form

S

Shadow

I have a form in a database and need to close this form after a certain
period of time, if the user doesn't use this form.
Is it possible?


thanks for any kind of advice.

Shadow
 
C

CSmith

Hi,

If you're tracking the time of the last form activity, say in a lookup table
(or a variable), then you might want to use something like the following:

CONST INACTIVITY_MINUTES_ALLOWED = 30

If DateDiff("n",DLookup("[LastActivityStamp]","tblLookupTable",Now) >
INACTIVITY_MINUTES_ALLOWED Then DoCmd.Close
 
C

CSmith

Correction:

CONST INACTIVITY_MINUTES_ALLOWED = 30

If DateDiff("n",DLookup("[LastActivityStamp]","tblLookupTable"),Now) >
INACTIVITY_MINUTES_ALLOWED Then DoCmd.Close

--
Calvin Smith
http://www.CalvinSmithSoftware.com - Automation Code
http://www.SpanglesNY.com - Fendi, Prada, etc - 60% off


CSmith said:
Hi,

If you're tracking the time of the last form activity, say in a lookup table
(or a variable), then you might want to use something like the following:

CONST INACTIVITY_MINUTES_ALLOWED = 30

If DateDiff("n",DLookup("[LastActivityStamp]","tblLookupTable",Now) >
INACTIVITY_MINUTES_ALLOWED Then DoCmd.Close

--
Calvin Smith
http://www.CalvinSmithSoftware.com - Automation Code
http://www.SpanglesNY.com - Fendi, Prada, etc - 60% off


Shadow said:
I have a form in a database and need to close this form after a certain
period of time, if the user doesn't use this form.
Is it possible?


thanks for any kind of advice.

Shadow
 

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