Results 1 to 6 of 6
  1. #1
    NISMOJim is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    273

    Compile error

    Hello,
    One of my users is getting a compile error on a field with the following code;

    Private Sub txtLocation_AfterUpdate ()


    Me.txtLocation = StrConv (Me.txtLocation, vbUpperCase)
    End Sub

    The window says Microsoft Visual Basic
    Compile Error:
    Can't find project or library.

    We're using Access 2007. While one user is getting this error, everything works fine on a different computer for other users. I'm thinking that something needs to be checked in the reference library on his computer, but I thought the references were accessed through the database, not the Access program for each computer. Does someone know for sure how this works, and if it is the case, which library should be checked to make this code work?

    Thank you for any insight into what's going on.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    The library selections are file specific, not an application setting.

    This is a split design? Are you sure user has the same version of frontend as everyone else? Have you tried replacing user's copy?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    NISMOJim is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    273
    By file specific, does that mean the reference libraries that are checked must be checked on each computer that uses this database?
    As for this database, it is all in one (not split design if I understand that right), and is on a shared drive, so everyone has access to it. Everything works on the other computers in the warehouse, just his computer is getting the error.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    No, I mean you were correct, the libraries selected is a setting of the db. Library selections are not an application setting.

    However, just hit me the error is Access is not finding the library. If Access application is not finding the selected library, then sounds like that install is corrupt. Try reinstalling Access.

    If necessary library was not even selected the error message would be different.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    NISMOJim is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jul 2010
    Posts
    273
    Thanks, I'll have him try that in the morning. That makes sense, because I'm pretty sure it must have worked for him before today.

  6. #6
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    When apps run fine on one machine and not on another, or run fine in one version and not when run under a newer version, one the first thing you have to think about are Missing References, and it could be the source of your problem, here.

    If you haven't checked for this kind of thing before, here are Doug Steele's detailed instructions on how to troubleshoot the problem:

    Access Reference Problems

    And while this could be a matter as simple as a Missing Reference, you really have a far greater problem, here:

    Quote Originally Posted by NISMOJim View Post
    ...As for this database, it is all in one (not split design if I understand that right), and is on a shared drive, so everyone has access to it...
    To be absolutely blunt about this, you are probably wasting your time trying to trouble-shoot this problem until you Split this database into a Front End/Back End configuration as is required on all Multi-User Access apps!

    Having multiple users sharing a single, non-split database, sitting on a network drive, is the sure way to repeated episodes of corruption, as well as speed and timing problems, all of which can present as Compilation errors! Multiple users simply have to work off of a Split Database, with each user having their own copy of the Front End, which contains everything except the data/tables, on their respective hard drives, and a Back End with all Tables on a shared drive.

    Being in forced retirement, I spend 6-8 hours a day here, and on other Access forums/newsgroups, and over the past six years have literally seen hundreds of reports similar to yours! The really insidious thing is that the app can work for extended periods of time before the troubles begin! But once it does, they become chronic, which is to say they occur over and over and over again!

    Without having a Split app, here, you're facing the certainty that, sooner or later, you're going to face much more than Compilation Errors, you're going to be facing corruption and the possible lose of data!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 2
    Last Post: 06-23-2012, 11:59 PM
  2. Replies: 7
    Last Post: 06-08-2012, 09:55 PM
  3. Replies: 6
    Last Post: 09-28-2011, 09:20 PM
  4. new compile error!
    By darklite in forum Access
    Replies: 6
    Last Post: 09-02-2010, 05:13 PM
  5. compile error
    By darklite in forum Access
    Replies: 6
    Last Post: 08-31-2010, 04:27 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