Results 1 to 10 of 10
  1. #1
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476

    How to Open Second Form when Database Opens?


    Under Create – Macro/Add new Action I choose open Form & select the Form’s name. Close & open database & second form does not open. Any suggestions, please?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,952
    What event are you using to trigger the macro?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    Hi June, thanks for responding. I don't understand what you mean by, "event?" I don't see "Event" in the Macro set up windows. To clarify, when I open up a dbs I would like to know if/how 2-Forms (Form-A & Form-B) open simultaneously upon dbs opens.

  4. #4
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    I'm a little hazy as to your exact scenario, but if you want to run a given Macro, when the database opens, the Macro would have to be named AutoExec.

    Alternately, of course, you could go into Access Options - Current Database and select the given Form in the 'Display Form' dropdown box.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,952
    An event is a button Click or form/report Open or form/report Load or control/form/report BeforeUpdate, AfterUpdate, etc.

    If you want an Action to occur some Event must execute that Action.

    For example, click a button to run code that opens a form or report.

    You want to automatically open a 'second' form so what Event must happen to execute the Action? Code in 'first' form Open or Load event?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    ling, thanks for responding. I know about your alternative suggestion, but I want to have more than one Form open when dbs is open/started. I once (way back) had a dbs where 2-Forms opened when dbs was opened, but I don't remember what/how I did.

  7. #7
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    I can't understand what you're saying. When creating a Macro I don't know how to have it be, AutoExec? Might you guide me on creating a AutoExec Macro?

  8. #8
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    If the name of the macro is AutoExec, the macro will execute at StartUp.

  9. #9
    djclntn is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    476
    Thanks, that worked! I suppose Access only lets up have 2-Forms open upon Startup?

  10. #10
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Additional code can open additional forms. Not sure what the maximum is but I will guess it is many more than two and would depend on the machine's available RAM.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 13
    Last Post: 07-24-2014, 04:30 PM
  2. Replies: 1
    Last Post: 03-02-2014, 01:31 PM
  3. Replies: 10
    Last Post: 01-02-2014, 04:16 PM
  4. Replies: 3
    Last Post: 09-27-2013, 07:56 AM
  5. Replies: 1
    Last Post: 01-22-2013, 09:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums