Results 1 to 6 of 6
  1. #1
    howlettb is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    20

    Making Previous Form hidden underneith new form

    Hi ... I have a database with several forms opening on top of each other. I know that I can make the previous form not visible by just using the code: forms!PreviousFname.visible = false on the opening of the new form. Is there a way to use this coding without giving a specific form name? I have a few forms that are opened from a few different places, and I would like to use the same feature. I'd appreciate any help you could give. Thanks

  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,521
    An alternative would be to have the previous form hide itself after opening th next form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    howlettb is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    20
    How do I do that? Can I do it without using the previous forms name??

  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,521
    The code would be in the previous form:

    Me.Visible = False
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    howlettb is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    20
    I'm sorry, I'm just not getting this. I put the code when I click the button to open the next form ... and that doesn't work. I have forms opening on top of each other. If I close it using the Me.visible feature ... how do I get it to open back up when I close the form on top of it.

  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,521
    Really? I just tested this and it worked fine:

    DoCmd.OpenForm "form2"
    Me.Visible = False

    You can pass the name of the first form in OpenArgs and use that to make it visible again.
    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: 3
    Last Post: 11-24-2014, 11:09 AM
  2. Form missing in Navigation Pane (not hidden)
    By Merganser in forum Forms
    Replies: 7
    Last Post: 09-11-2014, 06:55 PM
  3. Creating new object of form stay hidden first
    By Ruegen in forum Programming
    Replies: 11
    Last Post: 09-07-2014, 09:00 PM
  4. Replies: 8
    Last Post: 05-22-2014, 10:19 PM
  5. Replies: 2
    Last Post: 03-01-2011, 03:06 PM

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