Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    311
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Access 2007 switchboard issue

    I have been happily running a FE/BE system for quite a while with the FE using an .accdb and the backend being an .mdb. The switchboard was originally built in 97 and has migrated up through 2003 to 2007 without any issue whatsoever.

    On friday afternoon I decided to finally update the BE to an .accdb file. This all went well and I relinked all the tables without any issue.

    BUT the buttons on my switchboard for SUBMENUS will not work.

    It sounds a lot like the problem RetiredGeek had http://windowssecrets.com/forums/sho...e-on-File-Open

    except no matter how I open the switchboard form the buttons will not work.

    I have done nothing to the FE except relink the tables to the new BE. Switchboard table has always been FE

    The switchboard manager in 2007 seems hopeless as it won't show all the main menu items or resize properly as its supposed to.

    Any ideas anyone?
    Last edited by weyrman; 2014-08-03 at 20:14.
    "Heading for the deep end"

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,538
    Thanks
    0
    Thanked 23 Times in 23 Posts
    Haven't heard that one before, would you send the database zipped with test data only.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    311
    Thanks
    3
    Thanked 0 Times in 0 Posts
    here is a trimmed down copy of the front and back end. You will have to relink the back end tables. you will see that the sub menu options don't work even though all the code is there.
    Attached Files Attached Files
    "Heading for the deep end"

  4. #4
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,538
    Thanks
    0
    Thanked 23 Times in 23 Posts
    I put a Me.FilterOn = True prior to the Me.Filter = .... command and it seems to work fine

  5. #5
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    311
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Where about did you put it?
    "Heading for the deep end"

  6. #6
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,538
    Thanks
    0
    Thanked 23 Times in 23 Posts
    In the switchboard where the Select Case statement is for option 1 which sets the Filter for the form.
    In the Private Function HandleButtonClick(intBtn As Integer) you will see the following code:
    Code:
    On Error GoTo HandleButtonClick_Err
    
        ' Find the item in the Switchboard Items table
        ' that corresponds to the button that was clicked.
        Set con = Application.CurrentProject.Connection
        Set rs = CreateObject("ADODB.Recordset")
        stSql = "SELECT * FROM [Switchboard Items] "
        stSql = stSql & "WHERE [SwitchboardID]=" & Me![SwitchboardID] & " AND [ItemNumber]=" & intBtn
        rs.Open stSql, con, 1    ' 1 = adOpenKeyset
        
        ' If no item matches, report the error and exit the function.
        If (rs.EOF) Then
            MsgBox "There was an error reading the Switchboard Items table."
            rs.Close
            Set rs = Nothing
            Set con = Nothing
            Exit Function
        End If
        
        Select Case rs![Command]
            
            ' Go to another switchboard.
            Case conCmdGotoSwitchboard
                Me.FilterOn = True     '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                
                Me.Filter = "[ItemNumber] = 0 AND [SwitchboardID]=" & rs![Argument]
                
            ' Open a form in Add mode.
            Case conCmdOpenFormAdd
    Check out the code pointed to by '<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Attached Files Attached Files

  7. The Following User Says Thank You to patt For This Useful Post:

    weyrman (2014-08-04)

  8. #7
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    311
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks Pat,

    As you know that did it
    "Heading for the deep end"

Posting Permissions

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