Results 1 to 10 of 10
  1. #1
    WAVP375 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Dayton Ohio
    Posts
    171

    Compile error when moving application to lesser version of access

    An application developed on windows 10 current version of access runs beautifully. When moved to the production environment when executing the following code I get a compile error 'Can't find project or Library' and the error highlights the word Right in the line of code. When checking the reference list it show 'Missing Microsoft Access 16 Object library'. That library is not listed in the list obviously. Is ther way of coding around this or can the missing library be loaded somehow?

    Any thoughts will help significantly



    Private Sub BtnDisplay_Click()

    Dim LResult As String
    LResult = Right(ImagePath, 1)
    If LResult = "f" Then


    GoTo PdfDisplay
    ElseIf LResult = "g" Then
    GoTo JpgDisplay
    Else
    MsgBox "You Must Select A Document"
    Close
    End If
    Exit Sub

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    if you move the db to another pc you run the risk of THAT pc not having the same libraries.
    In an uncompiled db (.mdb, or accdb) , open it and get in the VBE, (ctl-G)
    menu, tools, references,
    it will show you the missing references. (marked MISSING)

    If you do NOT have full access installed on that PC, then there's no way to determine what libraries are missing.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try just unchecking the MISSING library and see if it compiles.

  4. #4
    WAVP375 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Dayton Ohio
    Posts
    171
    If I started from scratch and develop the entire application on the production network, would this eliminate the problem?

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Did you try my suggestion?

  6. #6
    WAVP375 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Dayton Ohio
    Posts
    171
    Yes, same problem

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by WAVP375 View Post
    Yes, same problem
    Thanks for the answer. It was worth a try.

  8. #8
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    If you are moving the database to an earlier version of MS Access, you need to reset the references list to use the earlier library versions that are on the production PC's.

    For example, in Access 2010 you will reference Office 14 Libraries, in Access 2013 it's Office 15. One other trick I've noticed is that if you get compile errors that make no sense, e.g.. an error when referencing a function you know is a part of Access, try moving the library reference upwards in the list.

    It's quite possible that you won't have to make any changes to your code, other than recompiling it.

  9. #9
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    You will continue to be hampered by this if some production pc's have different versions of Office and/or Access libraries installed if the IS/IT policy is to over-write the old libraries. You may need a table of references that get mapped depending on the version, or you will have to have more than one version of your base file in distribution.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  10. #10
    WAVP375 is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Dayton Ohio
    Posts
    171
    Thanks guys, I think I have it sorted out.

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

Similar Threads

  1. Replies: 2
    Last Post: 05-13-2016, 09:05 AM
  2. Compile Access Application
    By Abbey in forum Modules
    Replies: 1
    Last Post: 07-20-2015, 07:57 AM
  3. MS Access Compile Error
    By B00592816 in forum Access
    Replies: 12
    Last Post: 06-19-2014, 06:56 AM
  4. Replies: 2
    Last Post: 01-08-2014, 08:52 AM
  5. Replies: 6
    Last Post: 09-28-2011, 09:20 PM

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