form timeout
Microsoft Office Training verified by visa - mastercard securecode about microsoft training company london ukadd this page to your favourites/bookmarksAdd to favourites
view a printable version of this pagePrintable version
email this page to somebodyEmail this page
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Access Training and help » Form Time-Out

Form Time-Out

The UK's most regular instructor-led training courses.
Training information: ms access course · Access course microsoft training · Microsoft Access Training London
See also · microsoft access training · access vba courses · access database course

resolvedResolved · Low Priority · Version Standard

Form Time-Out

Clyde has attended:
Access Introduction course
Access Intermediate course
Access Advanced course

by - delegate Clyde [3 posts] (2008 Feb 13 Wed, 16:03) replyReply

How would I go about getting a form to auto-close after a set amount of time in a state of inactivity?

Access Advanced 1 day course
Version Date Location Places
available
Book Next place rate:
Card Invoice
2003 2008 Dec 19 Fri Bloomsbury 5 book now £219 £235
2003 2008 Dec 24 Wed Bayswater 0 FULL    
2003 2009 Jan 7 Wed Southwark 7 book now £203 £230
2003 2009 Jan 14 Wed Bloomsbury 8 book now £187 £224
2003 2009 Jan 23 Fri Bloomsbury 7 book now £203 £230
2003 2009 Jan 28 Wed Bayswater 8 book now £195 £205
Full Schedule: See all 44 Access Advanced course dates.
Bookings currently available until 25th November 2009.

Form Time-Out In Access

by - trainer Carlos gold contributer[479 posts] (2008 Feb 29 Fri, 13:37) Edited on 2008 Feb 29 Fri, 13:38 replyReply

Hi Clyde

To get you form to time-out after a certain amount of time do the following:

1. Create a macro that closes the required form

2. In the Forms Properties area select the Events tab

3. In the On Timer event select the macro created to close the form.

4. In the Time Interval section enter the time interval to close. (eg 30000)

NB For the Timer Interval 1,000 = 1 Second, 60,000 = 1 minute and 3,600,000 = 1 Hour

The timer starts when the form is opened.

Now the above Timer Interval value starts the timer as soon as the form opens and closes the form after the set time, whether it is inactive or not.

To overcome this as there is no Inactive event we need to keep reseting the clock on some Mouse and Keyboard actions.

To do this:

1. In the Key Press event select Event Procedure

2. Click the 3 dots to open the code window

3. Copy the following code and paste it in the code window:


Private Sub Form_KeyPress(KeyAscii As Integer)

Me.TimerInterval = 30000

End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

Me.TimerInterval = 30000

End Sub

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)

Me.TimerInterval = 30000

End Sub



NB The code resets the Time Interval back to our example value of 30000, everytime a key is clicked, or the mouse wheel or the mouse is moved on the form.

If these events cease to occur after the predetermined time the system will close the form

Hope this helps

Carlos

RE: Form Time-Out In Access

by - delegate Clyde [3 posts] (2008 Feb 29 Fri, 16:17) replyReply

Hi Carlos,

This works perfectly! Thank you very much!

Clyde


Related articles

· Microsoft Access Tighten your Security Controls
· Why Do I Need To Use Access?
· 3 Useful Things You'll Learn in Microsoft Access Training Courses
· MS Access: Access your Personal Information with Ease
· Why go on a Microsoft Access Training Course?

Please browse our web site to find out more about
ms access course and other Microsoft training courses.

Access tip:

Zoom feature for queries

If youare working on on query design and creating a calculated field, it can be hard to view the whole statement. You can hold the shift key down and press F2, to show the zoomed up version of the query field

View all Access hints and tips

Rate this page:
4.0/5 (3 votes cast)
Institute of IT Training - Accredited Training Provider Microsoft Certified Partner
microsoft office
Microsoft Office Specialist Authorised Testing Centre (MOS and MCAS)

Prodigy Platinum Learning Partner

Institute of IT Training - Accredited Training Provider Association of Computer Trainers Valid HTML 4.01 Transitional
Valid CSS Markup

secure online payments - visa - mastercard

Mini sitemap. These are the main areas of our web site. Full sitemap.

Training by application Main information pages See also

Access courses
DreamWeaver courses
Excel courses
MS Project courses
Outlook courses
PowerPoint courses
VBA courses
Word courses
(more...)

Public scheduled courses
On-site training
Closed company courses

Microsoft Office training
Pricing and availability
Training schedule
Training venues

Access training
Dreamweaver training
Excel training
MS Project training
PowerPoint training

London Computer Training
Computer Training London

Microsoft Access training
Microsoft Excel training
Microsoft Project training
Microsoft Outlook training
Microsoft Powerpoint training
Microsoft Word training

Time Management Course London

Interested in Access training? Please see the following pages:
microsoft access courses · microsoft training access course
microsoft+access+training · access courses in london

Training Information

Training Articles

AddThis Social Bookmark Button What's this?
Add to Del.icio.us Add to Facebook Add to Digg Add to Reddit Add to Google Add to Yahoo Add to Diigo Add to Mr. Wong Add to Linkarena Add to Power Oldie Add to Folkd Add to Jumptags Add to Upchuckr Add to Simpy Add to StumbleUpon Add to Slashdot Add to Netscape Add to Furl Add to Spurl Add to Blinklist Add to Blogmarks Add to Technorati Add to Newsvine Add to Blinkbits Add to Ma.Gnolia Add to Smarking Add to Netvouz