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 Programming / February 2008

Tip: Looking for answers? Try searching our database.

Use more than one timer event on a form?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
WembleyBear - 29 Feb 2008 22:13 GMT
Hi

I have a form on which I have set a timer event in order to display the
current date and time. The timer interval is set to 1000 and works as I want
it to. However, I also have a need to refresh a query on the form (actually
on a sub-form) at a regular interval; but not as often as the current time is
updated. So... my question is, is it possible to have more than one timer
event for a form/sub-form & how would I go about that, and if it's not
possible is there another way of going about what I'm trying to achieve?

Thanks very much
Martyn

Access 2000 on Windows Server 2003 over Citrix PS4
Marshall Barton - 29 Feb 2008 22:49 GMT
>I have a form on which I have set a timer event in order to display the
>current date and time. The timer interval is set to 1000 and works as I want
[quoted text clipped - 3 lines]
>event for a form/sub-form & how would I go about that, and if it's not
>possible is there another way of going about what I'm trying to achieve?

No, but you can use a counter to do something every N
intervals.

Const N as Integer = 30
Sub Form_Timer()
Static intCounter As Integer
Me.txtClock = Now
If  intCounter = 0 Then
    'do something every N seconds
End If
intCounter = (intCounter + 1) Mod N
End Sub

Signature

Marsh
MVP [MS Access]

 
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.