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 / July 2005

Tip: Looking for answers? Try searching our database.

Delay in code processing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 12 Jul 2005 07:40 GMT
Is it possible to make a pause in the code? For example:

Private Sub Form_Timer()
  Set db = CurrentDb
  Set tbl = db.TableDefs("MyTable")
  tbl.RefreshLink
  Me.TextBox.Value = "Status: ONLINE"

<<<Here I want a 2-seconds delay in code processing >>>

  DoCmd.Close
End Sub

Thank you in advance!
Graham R Seach - 12 Jul 2005 08:01 GMT
Mike,

Put this declaration in a standard module:
   Public Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal
dwMilliseconds As Long)

Then call it like so:
   Sleep 2000

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html

> Is it possible to make a pause in the code? For example:
>
[quoted text clipped - 10 lines]
>
> Thank you in advance!
Mike - 12 Jul 2005 08:14 GMT
Thank you, Graham!

> Mike,
>
[quoted text clipped - 27 lines]
> >
> > Thank you in advance!
 
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.