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 / Modules / DAO / VBA / March 2005

Tip: Looking for answers? Try searching our database.

Conditional Open form on startup

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
OregonIzer - 29 Mar 2005 21:13 GMT
I have an Access database that is emptied and re-used for each new 'campaign'
I have a main form that I go to at start-up but I want to start at a
"set-up" form until the user is ready to start at the main form.

Seems simple but I don't know how.
(Basically like the startup page you often see with programs that has a
check box saying "show this form at start")

I use a lot of VBA in the database - but I am entirely self taught so I
often don't know the basics. Thanks for any help
Dirk Goldgar - 30 Mar 2005 07:56 GMT
> I have an Access database that is emptied and re-used for each new
> 'campaign' I have a main form that I go to at start-up but I want to
[quoted text clipped - 7 lines]
> I use a lot of VBA in the database - but I am entirely self taught so
> I often don't know the basics. Thanks for any help

Suppose that you have a form, "frmSetup" that you want to show at
startup until the user un-checks a check-box named "chkShowAtStartup" on
the form, after which you want to show "frmMain" at startup.  Here's
code for "frmSetup":

'----- start of code -----
Option Compare Database
Option Explicit

Private Sub chkShowAtStartup_AfterUpdate()

   If Me.chkShowAtStartup Then
       CurrentDb.Properties("StartupForm") = Me.Name
   Else
       CurrentDb.Properties("StartupForm") = "frmMain"
   End If

End Sub
'----- end of code -----

Having created this form, all you have to do is set frmSetup as the
database's Startup Form.

Signature

Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
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.