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

Tip: Looking for answers? Try searching our database.

>> Open form then run code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonathan - 12 Dec 2005 01:38 GMT
Hi, in Access 97 I have a form with progress bars. I want to open the form
and then automatically run code.

How do I have the form open and all the controls visible before running the
code (and not require a user to click a button)?

Using the OnOpen and OnLoad events trigger the code before displaying the
form.

Many thanks

Jonathan
John Smith - 12 Dec 2005 14:37 GMT
Technique that I have used for this:

Private Sub Form_Open(Cancel As Integer)
  Me.TimerInterval = 1
End Sub

Private Sub Form_Timer()
  Me.TimerInterval = 0
  Your automatic code here
End Sub

This allows the form to open but needs a very fast user to get in before the
code runs!

If you want to update the form from your code I have found that
   Me.Repaint
is needed to get the update displayed.

HTH
John

> Hi, in Access 97 I have a form with progress bars. I want to open the form
> and then automatically run code.
> How do I have the form open and all the controls visible before running the
> code (and not require a user to click a button)?
> Using the OnOpen and OnLoad events trigger the code before displaying the
> form.
Jonathan - 12 Dec 2005 21:05 GMT
Thanks John, your suggestion works well....

Cheers
Jonathan

> Technique that I have used for this:
>
[quoted text clipped - 23 lines]
> > Using the OnOpen and OnLoad events trigger the code before displaying the
> > form.
 
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.