Results 1 to 11 of 11
  1. #1
    jamie c is offline Novice
    Windows XP Access 2002
    Join Date
    Mar 2010
    Posts
    6

    Switchboard at startup


    I have the startup options set to display the Switchboard at startup. Unfortunately, the switchboard doesn't display at startup on some PCs. It either works or it doesn't. If it works on a particular PC, it works every time. The converse is also true. On the PCs where it doesn't work, the menu choices at the top of the screen are also limited to File/Window/Help.

    Any help would be appreciated.

  2. #2
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    Have you checked that the different machines have the same version of Access installed?

    It could be that some of the machines are using runtime?

  3. #3
    jamie c is offline Novice
    Windows XP Access 2002
    Join Date
    Mar 2010
    Posts
    6
    Thank you for your reply.

    I checked and the Access versions, service packs, and builds on these PCs and they are the same as those that actually open the database.

  4. #4
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    And they're both definitley opening the same front file?

  5. #5
    jamie c is offline Novice
    Windows XP Access 2002
    Join Date
    Mar 2010
    Posts
    6
    After some further investigation, it appears that macro that starts the Switchboard is getting hung up at the following line of code. I was able to determine this by removing the file password and holding shift at startup.

    Set con = Application.CurrentProject.Connection


  6. #6
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    What is the error?

  7. #7
    jamie c is offline Novice
    Windows XP Access 2002
    Join Date
    Mar 2010
    Posts
    6
    "Class not registered"

  8. #8
    jamie c is offline Novice
    Windows XP Access 2002
    Join Date
    Mar 2010
    Posts
    6
    Here is the code...

    Private Sub FillOptions()
    ' Fill in the options for this switchboard page.
    ' The number of buttons on the form.
    Const conNumButtons = 8

    Dim con As Object
    Dim rs As Object
    Dim stSql As String
    Dim intOption As Integer

    ' Set the focus to the first button on the form,
    ' and then hide all of the buttons on the form
    ' but the first. You can't hide the field with the focus.
    Me![Option1].SetFocus
    For intOption = 2 To conNumButtons
    Me("Option" & intOption).Visible = False
    Me("OptionLabel" & intOption).Visible = False
    Next intOption

    ' Open the table of Switchboard Items, and find
    ' the first item for this Switchboard Page.
    Set con = Application.CurrentProject.Connection
    stSql = "SELECT * FROM [Switchboard Items]"
    stSql = stSql & " WHERE [ItemNumber] > 0 AND [SwitchboardID]=" & Me![SwitchboardID]
    stSql = stSql & " ORDER BY [ItemNumber];"
    Set rs = CreateObject("ADODB.Recordset")
    rs.Open stSql, con, 1 ' 1 = adOpenKeyset

    ' If there are no options for this Switchboard Page,
    ' display a message. Otherwise, fill the page with the items.
    If (rs.EOF) Then
    Me![OptionLabel1].Caption = "There are no items for this switchboard page"
    Else
    While (Not (rs.EOF))
    Me("Option" & rs![ItemNumber]).Visible = True
    Me("OptionLabel" & rs![ItemNumber]).Visible = True
    Me("OptionLabel" & rs![ItemNumber]).Caption = rs![ItemText]
    rs.MoveNext
    Wend
    End If
    ' Close the recordset and the database.
    rs.Close
    Set rs = Nothing
    Set con = Nothing
    End Sub

  9. #9
    SoftwareMatters is offline Access VBA Developers
    Windows XP Access 2003
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    274
    Try checking the references on both machines and if there is a difference correct it. The next thing is to have a look at the service packs and Microsoft Jet Database Engine versions for both Acces installations.

  10. #10
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    - or - consider simply making an alternative opening Form with buttons that open other forms/reports with command buttons - - and drop the switchboard altogether. It is a feature that I've always found overly complex and non-intuitive. I never use them in new designs.

  11. #11
    jamie c is offline Novice
    Windows XP Access 2002
    Join Date
    Mar 2010
    Posts
    6
    Problem solved after performing the following.

    1.) Log onto desktop system
    2.) Open a command window
    3.) change the directory to C:\windows\system32
    4.) from the prompt run the following:
    regsvr32 msjetoledb40.dll

    Thanks for the help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Startup form not showing?
    By cfasoftware in forum Access
    Replies: 1
    Last Post: 01-21-2010, 03:10 AM
  2. Tools>Startup... MISSING
    By bbylls in forum Access
    Replies: 4
    Last Post: 12-21-2009, 09:02 AM
  3. startup problem
    By Eric1066 in forum Access
    Replies: 3
    Last Post: 12-07-2009, 10:01 AM
  4. Startup Menu Greyed Out
    By slash75 in forum Access
    Replies: 0
    Last Post: 02-14-2007, 04:55 PM
  5. Bypassing Startup options with Ctrl W
    By rayc in forum Security
    Replies: 0
    Last Post: 09-06-2006, 09:18 AM

Tags for this Thread

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