Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I love this site! It's so nice to know that there are so many people out there who are willing to share their knowledge..."

Geography

Where in the world do Tek-Tips members come from?
TheOnlyBoxy (TechnicalUser)
23 Jul 04 5:12
I would like a script to run if my opproach database is not used for a specified amount of time, ( the script will close approach without saving) this is to ensure that the database is not left open as automated tasks run over night. any help would be very greatfull. Thankx
Helpful Member!  suesloan (TechnicalUser)
3 Aug 04 10:44
There is a "TimerInterval" property you can set to any value you want. For example, you could set it in a SwitchTo event for a form view switch that occurs via a macro named OPEN when your APR is opened:

' Set the timer interval for the current view to 15 seconds.
CurrentApplication.ActiveView.TimerInterval = 15000

When the TimerInterval expires, the "UserTimer" event is raised for the same view you started it on, so you can put code in that event to check for activity and either close or simply reinitialize the timer.

The main problem with this technique is determining whether the user is still active. So most people who use this technique simply check the current time and if it is after say 8PM, they close the APR. Another method if the interval is set to something like 20 minutes so as to not annoy the user is to pop up a dialog with a message asking the user if they want to continue and give them a couple of minutes to respond. If they do not, close the APR.

Sue Sloan
XpertSS.com
TheOnlyBoxy (TechnicalUser)
4 Aug 04 4:46
Thank you for replying to may question, about the close .apr after or at a certian time, I have tried this but cannot get it to work, i am quite a novice with approach. would you be able to give me an example of approach closing at a certian time, in script. it would be very much appreciated. thanks Jamie.
TheOnlyBoxy (TechnicalUser)
4 Aug 04 5:08
Sorry sue I have now managed to get the .apr file to close after a period of time, but i cant figure out how to get it to close at a specific time or if the active view has been idle for X amount of time.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close