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

    That is and where is the 5th & 6th argument?


    That is and where is the 5th & 6th argument?

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

    How do I un solve this post?

    OOps I clicked soved on the wrong post.

    How do I un solve this post?

  3. #18
    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
    Each of your form buttons will need to be modified with basically the same code. The acDialog does several things: 1) Turns on PopUp and Modal for the next form and 2) Suspends the code in the first form. Modal forces the user to complete or close the next form and PopUp makes the form the *top* form.

  4. #19
    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
    Quote Originally Posted by newtoAccess View Post
    OOps I clicked soved on the wrong post.

    How do I un solve this post?
    It is a toggle so just click it again.

  5. #20
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226
    So this is what it looks like now.
    What does the me.visible= False and True do?
    When I have them in the script of the only button on my main form.
    The form stays on top and does not allow access to or shows the next form called "Event Selector"


    -----------------------------------------------------------
    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
    DoCmd.OpenForm stDocName, , , , , acDialog
    Me.Visible = True
    Exit_Command48_Click:
    Exit Sub
    Err_Command48_Click:
    MsgBox Err.Description
    Resume Exit_Command48_Click

    End Sub

  6. #21
    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
    Too many OpenForms! Get rid of the RED one.
    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
       DoCmd.OpenForm stDocName, , , , , acDialog
       Me.Visible = True
    Exit_Command48_Click:
       Exit Sub
    Err_Command48_Click:
       MsgBox Err.Description
       Resume Exit_Command48_Click
    End Sub

  7. #22
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226
    Will the me.Visible = False/True
    Work when I want to open a report? as in code below..

    When I run this it puts the report in the back and locks Access up.


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

    End Sub
    Private Sub Xmas_dinner_sample_01_Click()
    On Error GoTo Err_Xmas_dinner_sample_01_Click
    Dim stDocName As String
    stDocName = "Xmas_01"

    Me.Visible = False
    DoCmd.OpenReport stDocName, acPreview
    Me.Visible = True

    Exit_Xmas_dinner_sample_01_Click:
    Exit Sub
    Err_Xmas_dinner_sample_01_Click:
    MsgBox Err.Description
    Resume Exit_Xmas_dinner_sample_01_Click

    End Sub

  8. #23
    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
    You need to specify the Dialog WindowMode.
    DoCmd.OpenReport stDocName, acPreview, , , acDialog

  9. #24
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226
    Great I will try that tomorrow pm.

    Thanks again.

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

    Return buttons not working

    Thanks
    That seems to work but now my return buttons are not working. I button on each form that will return me back to a previous form/menu?

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

    Private Sub Main_Window_Click()
    On Error GoTo Err_Main_Window_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Main Menu"
    DoCmd.OpenForm stDocName, , , stLinkCriteria
    Exit_Main_Window_Click:
    Exit Sub
    Err_Main_Window_Click:
    MsgBox Err.Description
    Resume Exit_Main_Window_Click

    End Sub

  11. #26
    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
    The previous form is still open but invisible. You so not need to open it. Just close the current form and it will return to the previous form. Pressing the X in the upper right will do it. Or DoCmd.Close acForm, Me.Name, acSaveNo

  12. #27
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226
    Once I removed me.visible it works for now.

    I have removed most of the user options such as the maximise, minimise, close scrollbars etc. form all three forms/menus.

    My main menu has nothing but the form/menu, no top, bottom, borders, switches,etc just the way I want it.

    The next two forms have a blue top border with the name of the form. How do I get rid of the top border of my form?
    I have checked the properities of my main menu to the properities of the other two menu's and can't see where the difference is.

    Am I looking in the correct place?

  13. #28
    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 setting the BorderStyle to NONE on the Format tab.

  14. #29
    newtoAccess is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Nov 2009
    Posts
    226
    All three of my forms have the Border style set to NONE.

    Would it have something to do with the code for the button that open the forms. Like the ones below.

    I noticed that all the buttons will work once when I first open the file. Then when I return to the main form and make changes to the data on the form then select the next two forms the top border is back on top.

    It does work once. So something is turning on the border in two of my three forms.

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

    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

    -------------------------------
    Private Sub Command14_Click()
    On Error GoTo Err_Command14_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Christmas Dinner Menu"

    Me.Visible = False
    DoCmd.OpenForm stDocName, , , , , acDialog
    Me.Visible = True

    Exit_Command14_Click:
    Exit Sub
    Err_Command14_Click:
    MsgBox Err.Description
    Resume Exit_Command14_Click

    End Sub
    -------------------------------------------

    Private Sub Command2_Click()
    On Error GoTo Err_Command2_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Event selector"
    DoCmd.Close acForm, Me.Name, acSaveNo

    Exit_Command2_Click:
    Exit Sub
    Err_Command2_Click:
    MsgBox Err.Description
    Resume Exit_Command2_Click

    End Sub
    -------------------------------------------

    Private Sub Main_Window_Click()
    On Error GoTo Err_Main_Window_Click
    Dim stDocName As String
    Dim stLinkCriteria As String


    stDocName = "Main Menu"

    DoCmd.OpenForm stDocName, , , , , acDialog
    DoCmd.Close acForm, Me.Name, acSaveNo


    Exit_Main_Window_Click:
    Exit Sub
    Err_Main_Window_Click:
    MsgBox Err.Description
    Resume Exit_Main_Window_Click

    End Sub
    --------------------------------------------------

  15. #30
    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
    Is all of that code in one form? The Main_Window_Click() code is opening a form in Dialog mode and then closing the current form; not a good idea.

Page 2 of 3 FirstFirst 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