Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2005

Tip: Looking for answers? Try searching our database.

On Timer Event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DS - 26 Oct 2005 19:25 GMT
How do you do an OnTimer Event to change the properties of a line?

At 1 Second
DoCmd.MoveSize , 0.5 * 1440
At 2 Seconds
DoCmd.MoveSize , 1 * 1440
At 3 Seconds
DoCmd.MoveSize , 1.5 * 1440
At 4 Seconds
DoCmd.Close acForm,"Form1"
DoCmd.OpenForm"Form2"

Thanks
Any Help Appreciated.
DS
Douglas J Steele - 26 Oct 2005 19:29 GMT
Declare a Static variable in the Timer event (or, if you must, you can use a
global variable) to keep track of how many times you've been in the routine.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

> How do you do an OnTimer Event to change the properties of a line?
>
[quoted text clipped - 11 lines]
> Any Help Appreciated.
> DS
DS - 26 Oct 2005 20:22 GMT
> Declare a Static variable in the Timer event (or, if you must, you can use a
> global variable) to keep track of how many times you've been in the routine.

Thanks Doug.
DS
Dirk Goldgar - 26 Oct 2005 19:33 GMT
> How do you do an OnTimer Event to change the properties of a line?
>
[quoted text clipped - 11 lines]
> Any Help Appreciated.
> DS

Set the TimerInterval to 1000 (1000 milliseconds = 1 second).  In the
Timer event procedure, have a Static counter variable ...

   Static intSecondsCount As Integer

increment it each time the event fires ...

   intSecondsCount = intSecondsCount + 1

and check it incremented value to decide what to do:

   Select Case intSecondsCount
       Case 1
           DoCmd.MoveSize , 0.5 * 1440
       Case 2
           DoCmd.MoveSize , 1 * 1440
       Case 3
           DoCmd.MoveSize , 1.5 * 1440
       Case 4
           ' switch off the timer
           Me.TimerInterval = 0
           ' close this form
           DoCmd.Close acForm, Me.Name, acSaveNo
           ' open Form2
           DoCmd.OpenForm"Form2"
       Case Else
           ' just in case
           intSecondsCount = 0
   End Select

I'm not sure what exactly the "DoCmd.MoveSize" lines are going to do, or
whether they are really what you want to do, but the timing logic at
least should be as I've shown.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

DS - 26 Oct 2005 20:21 GMT
>>How do you do an OnTimer Event to change the properties of a line?
>>
[quoted text clipped - 45 lines]
> whether they are really what you want to do, but the timing logic at
> least should be as I've shown.

Dirk, It worked like magic!  I'm using a line a s aprogress bar on the
opening of a form and this is just what I needed.  Thanks Once Again.
Sincerely,
DS
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.