Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Switchboard (Access 97)

    I am trying to create a switchboard but when I go to open the switchboard, it gives me a compile error - Automation Error. The area that is highlighted in the code is:
    Private Sub filloptions()
    Dim dbs as Database

    Dim dbs as Database is highlighted. My help file is disabled for some reason. When they gave me Access 2000, I lost the help in Access 97. I went into Access 2000 (VBA help) to see what Automation Error was but I didn't find anything.
    I have tried several times to create this switchboard but can't get past the automation error.

    Thanks for your help.....

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Switchboard (Access 97)

    In any module, select Tools/References...
    Make sure that Microsoft DAO 3.51 (or 3.6) Object Library is checked.
    In an Access 97 database, you probably don't use ADO, so uncheck Microsoft ActiveX Data Objects ... Library (if checked).
    If you *do* need ADO, prefix all declarations of Database and Recordset in the Switchboard form module with DAO, like

    Dim dbs As DAO.Database

    If this doesn't work, perhaps some Office 97 DLL has been overwritten by the Office 2000 version. I don't know anyhing about that, but other Loungers do.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboard (Access 97)

    Microsoft DAO 3.51 is checked and the other was unchecked. When I tried to put DAO in front of database, it just went back to database and the error "automation error reappeared. I created other switchboards using Access 97 and had no problem. I even copied a switchboard from another database (that worked) that had similar options ( I edited the input options) but for this database still gets that automation error.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Switchboard (Access 97)

    Hmm, if the switchboard works in other '97 databases, perhaps this one is damaged.

    You can try to decompile, then compile and compact the database (do this on a copy of your database for safety; if you don't know what is meant by 'decompile', look at <post#=44571>post 44571</post#> and replies in that thread).

    Or you can create a new, empty database, and import all objects except for the Switchboard Items table and the Switchboard form, and try to create a Switchboard in this database.

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Switchboard (Access 97)

    I had a corrupt form and a report that was corrupt. I created a new database and copied everything but the corrupt form and the corrupt report and the switchboard opened. I guess it didn't like the corrupt objects. Thanks for your help.

Posting Permissions

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