Results 1 to 8 of 8
  1. #1
    tc197 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Jun 2014
    Posts
    69

    Using a form to open a form?

    Hi everyone and thanks for your help!



    I was wondering if it is possible to have a form open another form. Essentially I have 5 different forms all used for data entry. Depending on the product determines which form needs to be filled out. I was wondering if it was possible to have sort of a main menu that would allow the user to choose which form they would like to open. On the front end of my database the user doesn't need to open anything other than the 5 forms and I know that you can set access to open a specific form upon opening the database... so I was wondering if that form could be a main menu which other forms could be chosen from. Do you follow my idea?

    So the user clicks on the MSAccess program -> database opens and a form pops up with 5 options, form 1, form 2, form 3 , form 4, form 5 -> user selects a form from the list -> form opens up and user enters data as usual -> user finishes entering data and either closes form or clicks a button to return to the "main menu" form. Is it possible/ not too complicated? Thanks for the help!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Easy; with 5 buttons you could have each open a different form using OpenForm. You could use a combo with the form names and a button:

    DoCmd.OpenForm Me.ComboName
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tc197 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Jun 2014
    Posts
    69
    Quote Originally Posted by pbaldy View Post
    Easy; with 5 buttons you could have each open a different form using OpenForm. You could use a combo with the form names and a button:

    DoCmd.OpenForm Me.ComboName
    I'm glad that it's easy but I don't follow the docmd.openform thing.

    Where do I start in access? With a new form? and did you give me the choice of 5 buttons or a combo box? Or was that all part of the same option. I'm sorry I don't understand the language behind everything quite yet. Thanks for the reply though!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Yes, you'd start with a new blank form and make it the startup form. I gave you a choice between 5 buttons and a combo box/single button. The code was for the second option.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    tc197 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Jun 2014
    Posts
    69
    Quote Originally Posted by pbaldy View Post
    Yes, you'd start with a new blank form and make it the startup form. I gave you a choice between 5 buttons and a combo box/single button. The code was for the second option.

    Ok perfect. I kind of prefer the 5 button option. How do I go about writing the code to give the button it's "assignment"? In your example was the "Me" the name of the form?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    The 5 button option wouldn't require that. The button wizard will do it for you, but the VBA code would be:

    DoCmd.OpenForm "FormName"

    If you haven't used VBA code yet:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    tc197 is offline Advanced Beginner
    Windows 7 32bit Access 2003
    Join Date
    Jun 2014
    Posts
    69
    Quote Originally Posted by pbaldy View Post
    The 5 button option wouldn't require that. The button wizard will do it for you, but the VBA code would be:

    DoCmd.OpenForm "FormName"

    If you haven't used VBA code yet:

    http://www.baldyweb.com/FirstVBA.htm

    Thanks for the help! This is exactly what I need!

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 8
    Last Post: 05-22-2014, 10:19 PM
  2. Replies: 1
    Last Post: 03-02-2014, 01:31 PM
  3. Replies: 2
    Last Post: 04-01-2013, 04:23 PM
  4. Replies: 1
    Last Post: 05-03-2012, 02:25 PM
  5. Replies: 2
    Last Post: 02-26-2010, 08:14 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