Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Brugge, Belgium
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Protecting the code (ms Access 2007)

    To protect the code of a MS Access database program, we have the possibility to convert the ACCDB files into ACCDE files.
    Sometimes however the need exists to make changes to the code at the site of the client.
    With the files in ACCDE mode, there's no way to do this. I believe we have to go back to the ACCDB version, make the changes there and then converting the program back to ACCDE.
    My question is: does there exists a method to protect the code such a way that the user can't see nor change the code,while for the programmer himself, this as possible at the site of the client?

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

    Re: Protecting the code (ms Access 2007)

    You can protect your VBA code with a password. In Access 2000-2003 this is done as follows, I assume it's similar in Access 2007:
    - Activate the Visual Basic Editor.
    - Select Tools | <project name> Properties...
    - Activate the Protection tab.
    - Tick the check box "Lock project for viewing".
    - Enter the password that you want to use twice.
    - Click OK.
    Next time you open the database and try to view VBA code, you'll be asked to provide the password.
    Note: the code will run even if the user doesn't know the password; the password is needed to view and edit the code.
    Attached Images Attached Images
    • File Type: png x.png (10.0 KB, 1 views)

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Protecting the code (ms Access 2007)

    Alot depends on who you are trying to keep out. The casual user, the more experienced user, an Access developer?

    I strongly recommend you read Garry Robinson's "Real World Microsoft Access Database Protection and Security". This covers a host of things you can do even without necessarily invoking Access Security.

    One question, though. Any particular reason you can't fix the code at your location and transmit the corrected db to the client?
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Brugge, Belgium
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protecting the code (ms Access 2007)

    First of all, thank you very much for the help.
    The reason why i can't fix the problem from my location is because for the moment the computer at the clientside on which the program runs, isn't connected with the internet.
    This will be done in the nearest future, but even after that i remain with another question: The program is a multiuser program, so the front-end is situated on three computers at the client-side. This means that all of this computers has to be connected to the internet, wright? This is what the administrator at the client side doesn't want. What program do i have to use in order to fix some code at the client -side from my location?

  5. #5
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Protecting the code (ms Access 2007)

    The approach I take is to have a "master" copy of the frontend sitting on the server. I link this frontend to the backend (using UNC designations, rather than mapped drives, so there are no problems). I then have a simple .bat file that I put in each users Startup folder that copies-down the latest "master" FE to the individual computer's local drive (or, stick this somewhere that the user can manually execute it). I also put a version date (or number) in both the backend and frontend, which must match. If the user is opening a frontend that has a later version, then this new version is placed in the backend. If the backend has a later version, then user is instructed to copy-down the latest program version.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  6. #6
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Brugge, Belgium
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protecting the code (ms Access 2007)

    Better later than never... Thank you very very much for the advice.
    Sorry, i was so busy with other duties, that i forgot to check my mail.

  7. #7
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Protecting the code (ms Access 2007)

    If the Frontend has a more recent Version Date than the Backend, then the Backend is updated with the new Version Date. This way, when anyone else opens their frontend that has an older Version Date, they are prompted to download the latest program version.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  8. #8
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protecting the code (ms Access 2007)

    Thanks. Couple more questions: when I use the Link Tables command to link tables on a server drive's backend, I never get the path specified as UNC, how do you achieve that? Can you post your .bat file?

  9. #9
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protecting the code (ms Access 2007)

    "If the user is opening a frontend that has a later version, then this new version is placed in the backend."
    Mark, can you please clarify: do you mean if the user has an older version of the frontend, then the newer version is placed...in the backend? I guess you mean in the pc's folder where the older version is. Couple more questions: when I use the Link Tables command to link tables on a server drive's backend, I never get the path specified as UNC, how do you achieve that? Can you post your .bat file?

  10. #10
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Protecting the code (ms Access 2007)

    When I post the "master" Frontend on the server, I manually link it. I'm just careful not to select the location based on a mapped drive. When Access asks for the location, I make sure I locate it by selecting "Network Neighborhood" first (or whatever name it is now called). This way, when each user copies-down the FE, it is already linked for them.

    The .bat file is simple. It doesn't need to contain anything more than a single line, such as

    copy serverdatamyFE.mdb c:somethingmyFE.mdb
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  11. #11
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protecting the code (ms Access 2007)

    Thanks again <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    "If the Frontend has a more recent Version Date than the Backend, then the Backend is updated with the new Version Date."
    I guess Frontend above means the "master" copy of the frontend sitting on the server so how do you trigger the backend update or do you update it manually?
    "This way, when anyone else opens their frontend that has an older Version Date, they are prompted to download the latest program version."
    Is this download automatic after the user replies affirmatively to the prompt?

  12. #12
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Protecting the code (ms Access 2007)

    Actually, there isn't a prompt; they just get pop-up notice that they need to download the new version, then the DB closes. Maybe one of these days I'll work on making it automatic.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  13. #13
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protecting the code (ms Access 2007)

    "If the Frontend has a more recent Version Date than the Backend, then the Backend is updated with the new Version Date."
    I guess Frontend above means the "master" copy of the frontend sitting on the server so how do you trigger the backend update or do you update it manually?

  14. #14
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Protecting the code (ms Access 2007)

    The routine that compares the version dates will then update the BE with the new Version Date if appropriate.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  15. #15
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Alzano Lombardo, Italy
    Posts
    1,483
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Protecting the code (ms Access 2007)

    What fires off this routine?

Page 1 of 2 12 LastLast

Posting Permissions

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