Page 1 of 3 123 LastLast
Results 1 to 15 of 37
  1. #1
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226

    Hiding forms/Menus in the back ground


    I have three forms/menus

    Each form/menu overlaps the other when selected.

    Is there a way to hide the previous forms/menus not in present use?

    I am afraid the user will click on a form that is in the back ground and not on the present form in use.

  2. #2
    VICTOR HUGO is offline Novice
    Windows XP Access 2002
    Join Date
    Nov 2009
    Location
    Portugal - Asseiceira
    Posts
    20
    I think and normally I use some movements like when that form open close the other using the properties inside of Events, like when open this close that or vice-versa.

    Using Docmd.close acform....

    Of course depends also of your database structure.

    Try and good luck.

    Regards,
    Victor Hugo

  3. #3
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226

    Just want to hide it

    I do not want to close the form as I need the data from it.

    I only need to hide it. If I close it the inputted data will not be avilable in the report I am using.

  4. #4
    VICTOR HUGO is offline Novice
    Windows XP Access 2002
    Join Date
    Nov 2009
    Location
    Portugal - Asseiceira
    Posts
    20
    Ok,
    Sorry but for the 1st I didn't realize that is to hide.
    Try this:
    '------------------------------------------------------'In the main form:'------------------------------------------------------Private Sub cmdOpen3_Click() Me.Visible = False DoCmd.OpenForm "Form3", OpenArgs:=Me.NameEnd Sub'------------------------------------------------------'In the second form:'------------------------------------------------------Private Sub Form_Unload(Cancel As Integer) Forms(Me.OpenArgs).Visible = TrueEnd SubIt lets you avoid hard-coding a form's name, which means the second form can be opened by any other form in the application without having to worry about which form needs to be restored. The name of the form to be restored is in the OpenArgs property.

  5. #5
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226

    I am very very new to Access.

    I am very very new to Access.

    Where do I/How do I do what you suggest?

  6. #6
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226

    Is ther a way to minimize a specific form?

    Your line above about closing the form. Is there a way just to minimize a specific form Something to do with "onlost"

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    How are you opening all of the various forms?

  8. #8
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226

    The events for my ticket maker db

    I have a Main Menu where the user enters all data that is required on tickets. They then select a button for <next window>.

    The new menu form has several buttons for the specific time of year e.g. Halloween, Thanks giveing, New Years. They select the new years button.

    The new years form has several buttons each a different ticket Report format design etc. The user selects and views each button untill they find the ticket they like the best. The fields on the ticket (report) are filled in from the data entered on the main Menu.

    When happy the user verifies the number of tickets they need and select print.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    There is code behind each button. Post some of that code and we'll show you how to hide the first form while showing the next form and then unhide the 1st form when the user is done with the next form.

  10. #10
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226

    Here it is

    Is this what you are looking for?
    ___________________________

    End Sub
    Private Sub Command48_Click()
    On Error GoTo Err_Command48_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Event selector"
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    Exit_Command48_Click:
    Exit Sub
    Err_Command48_Click:
    MsgBox Err.Description
    Resume Exit_Command48_Click

    End Sub

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Exactly! So try this code to see what happens:
    Code:
    Private Sub Command48_Click()
       On Error GoTo Err_Command48_Click
       Dim stDocName As String
       Dim stLinkCriteria As String
       stDocName = "Event selector"
       Me.Visible = False
       DoCmd.OpenForm stDocName, , , stLinkCriteria, acDialog
       Me.Visible = True
       
    Exit_Command48_Click:
       Exit Sub
       
    Err_Command48_Click:
       MsgBox Err.Description
       Resume Exit_Command48_Click
    End Sub

  12. #12
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226

    I got an error

    Error Expression in argument 5 has an invalid value.
    Where is argument 5?

    ------------------------------------------------


    End Sub
    Private Sub Command48_Click()
    On Error GoTo Err_Command48_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Event selector"
    Me.Visible = False
    DoCmd.OpenForm stDocName, , , stLinkCriteria, acDialog
    Me.Visible = True
    Exit_Command48_Click:
    Exit Sub
    Err_Command48_Click:
    MsgBox Err.Description
    Resume Exit_Command48_Click

    End Sub

  13. #13
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226

    Will check back tomorrow

    My bos is on my back <wife> I will have to get back to you tomorrow.

    Thanks for the help

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows XP Access 2002
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Try:
    DoCmd.OpenForm stDocName, , , , , acDialog
    acDialog needs to be the 6th argument, not the 5th. My bad!

  15. #15
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226
    I made the change below.

    When I click on the button it goes to the next form/menu as required.
    When I click on a button to open a new form/Menu it opens in the back ground not as the front form. The form in fromt is inactive. I have to do a Ctl/Alt/Del to get Access to shut down.

    Remember I am new to Access.

    Wher is the 5th and 6th?

    ------------------------------------
    End Sub
    Private Sub Command48_Click()
    On Error GoTo Err_Command48_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Event selector"
    Me.Visible = False
    DoCmd.OpenForm stDocName, , , , , acDialog
    Me.Visible = True
    Exit_Command48_Click:
    Exit Sub
    Err_Command48_Click:
    MsgBox Err.Description
    Resume Exit_Command48_Click

    End Sub

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Main Menu and Sub Menus
    By REngelbr in forum Access
    Replies: 0
    Last Post: 08-25-2009, 03:51 PM
  2. Hiding fields that contains empty records
    By sakthivels in forum Reports
    Replies: 4
    Last Post: 05-27-2009, 07:06 AM
  3. Hiding subreports
    By aouellette in forum Reports
    Replies: 0
    Last Post: 09-12-2008, 08:02 AM
  4. Drop Down Menus
    By iambia in forum Access
    Replies: 1
    Last Post: 01-25-2008, 02:05 PM
  5. hiding forms
    By Halocarbon in forum Access
    Replies: 1
    Last Post: 12-09-2005, 09:51 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