help with closing this form

  • Thread starter Thread starter Shadow
  • Start date Start date
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
 
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
 
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
 
Back
Top