Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2010
    Posts
    41

    Unanswered: Switchboard Items

    Hi there,

    This is probably straight forward but ive googled and googled and i cant find the answer,

    i have a main switchboard with 3 sub switchboards - on the sub switchboards i want a button to go back to the main switchboard - do i add an open form button to open the main switchboard or is there something more complex i need to do like add a button that will close the subswitchboard and return to the main switchboard?

    Thanks

  2. #2
    Join Date
    Dec 2009
    Location
    Lake County, IL
    Posts
    8
    You could go either way. Depends on whether you want to have the sub switchboard open after you go back to the Main Switchboard. This is strictly a designer preference. In either case, it is not difficult. You can use them separately or combine the following commands.

    Code:
    Private Sub Command_CloseForm_Click()
    On Error GoTo Err_Command_CloseForm_Click
    
    
        If Me.Dirty Then Me.Dirty = False
        DoCmd.Close
           
    
    Exit_Command_CloseForm_Click:
        Exit Sub
    
    Err_Command_CloseForm_Click:
        MsgBox Err.Description
        Resume Exit_Command_CloseForm_Click
        
    End Sub
    
    Private Sub Command21_Click()
    On Error GoTo Err_Command21_Click
    
        Dim stDocName As String
        Dim stLinkCriteria As String
    
        stDocName = "frmExample"
        DoCmd.OpenForm stDocName, , , stLinkCriteria
    
    Exit_Command21_Click:
        Exit Sub
    
    Err_Command21_Click:
        MsgBox Err.Description
        Resume Exit_Command21_Click
        
    End Sub

  3. #3
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    I'd ditch the switchboard and simply code in buttons (ie. OnClick event of the button) to do what you want. The switchboard is a poor feature in MSAccess.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Mar 2010
    Posts
    41
    ok i managed to sort this - i have1 form i use as a switchboard with tabs. no sub switchboards

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •