Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004

    Red face Unanswered: Can't find object or library - I'm stumped!!

    I took over a co-workers Access 2002 application. It was currently working at one site and needed to be put on another. (Sounded simple). I sent it to the new user to setup and when they tried to run it got:

    Compile Error: Can't find object or library

    The mdb was created in Access 2002 SP 2, the user has the same.
    When I stepped through the code I found it was erroring on a TRIM:

    Function GetFileName() As String
        Dim gfni As adh_accOfficeGetFileNameInfo
        With gfni
            .hwndOwner = Application.hWndAccessApp
            .strDlgTitle = "Import Wal-Mart Routes Raw Data"
            .strOpenTitle = "Select"
            .strFile = ""
            .strInitialDir = Application.CurrentProject.Path
            .strFilter = "XLS (*.xls)"
            .lngFilterIndex = 2
            .lngView = adhcGfniViewList
            .lngFlags = adhcGfniNoChangeDir Or adhcGfniAllowMultiSelect Or adhcGfniInitializeView
        End With
        If adhOfficeGetFileName(gfni, True) = adhcAccErrSuccess Then
           GetFileName = Trim(gfni.strFile)
            Exit Function
        End If
    End Function
    At first I thought it was a common dialog issue, but then noticed it was using an API call to msaccess.exe to create the dialog box. I checked all the references and made sure msaccess.exe was where it was supposed to be. I even tried to reinstall MDAC 2.8 (advice from a coworker).

    I'm at a loss right now. The only thing I can think is that maybe MS Office wasn't installed properly on the user's computer?

    Any ideas would be greatly appreciated!!

  2. #2
    Join Date
    Apr 2006
    try to go back to your original application and on the object browser look for where the adh_accOfficeGetFileNameInfo object is declared...

    that's what's missing in your in your latest installation
    Only quitters quit!

Posting Permissions

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