Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2014
    Posts
    3

    Unanswered: Is it possible for a libary reference to be read-only

    Hello, I've written a few modules would VB code that I've found to be useful many other other databases, so I saved an MS Access 2010 .accdb file that just contains those modules, and then when I go into other MS Access database, I create a library reference via the Tools/References menu to point to this code I wrote.

    It works perfectly, as long as the user has read/write access to the library reference (i.e. file that contains my code). But if they have read-only access, they can't add the library as a reference... an error message occurs while trying to add the reference. To me, intuitively, the code will never be changed by the user, so I'm confused why they'd need read-write access to it. Is there by chance a way for them to gain access on a read-only basis?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Dont know to be honest, but i suppose you could deploy the code module as an accde and thatshouldprotect your code. But if you do go down the accde route make certain you keep your original accdb for development. Going to accde is a one way process.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Dec 2014
    Posts
    3
    I've been wondering about this all day, but it just dawned on me what could be happening. When a database is opened, a .laccdb files is created for it, and for any other databases it's linked to, including via the library references.

    So with read-only access to the folder containing the library database, they're prevented from creating the .laccdb file. I just had our network guy grant them ability to create new files, and delete new files (as the .laccdb file will need to be auto deleted when they log off), but still preven their ability to modify or delete existing files. (I didn't know that type of security was possible, but he says it is.)

    I had a user test it, and it works now.

    One thing I don't know yet is what happens of two people use it at the same time. I don't think MS Access creates two .accdb files, so I'm guessing that whoever is the last one to log off is the one who is deleteing the .laccdb file, which means, the one who initially created it might not be the same one. I don't know if the type of security we have would allow that. I guess I'll test that too and see what happens.

    Editted to add: I just did the test, and it seems to work perfectly now. Thank you for the comment/idea about the accde strategy. I suppose I could try that, but to be honest, I've never made an accde file... I should probably learn how to do that.
    Last edited by tkelley; 12-18-14 at 19:25.

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Quote Originally Posted by tkelley View Post

    ...what happens of two people use it at the same time. I don't think MS Access creates two .accdb files...
    Access doesn't 'create' any .accdb files. If this is a multi-user environment, the app needs to be split, and each user should have their own copy of the Front End on their machines, with the Back End, with all Tables, on a shared drive.

    As to the original question, are you not sending, which is to say writing, data to the functions in these modules, in order for them to do whatever it is they do?

    Linq ;0)>
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  5. #5
    Join Date
    Dec 2014
    Posts
    3
    oops,,, I meant to say .laccdb files. Anyway, I'm talking about the .laccdb file that gets created when a database is opened that uses the associated .accdb file as a library reference. Any data that gets written is to tables in the database that refers to the library reference database (or linked tables to some other location). Nothing gets written to the library reference database itself.

    The referenced database has no front-end that needs replicating, as it's simply a collection of VB modules containing code that I've been finding myself rewriting for my various databases that the users use, so that's why I decided to create one central database to contain this type of universal code, and then have other databases link to it via the reference libraries.

Posting Permissions

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