none
How to prevent users from copying a MS Access 2016 database RRS feed

  • Question

  • I have created a MS Access 2016 desktop database solution. I have one database with the tables and another with the forms, queries, reports etc. I have downloaded Access 2016 Runtime and have successfully installed my database on a PC that does not have Access. However, now I want to make it so that a user cannot simply copy the database and use it on other PCs. How can I do this?
    Friday, June 3, 2016 2:12 PM

Answers

  • Hi YFrancis,

    Hi as we already know we can't stop user to copy the Access File but here we have one work around so that user can copy the Access File but will not able to use so that if they have our database then also it's useless for them.

    The idea is to have the database check its location using CurrentProject.Path or CurrentProject.Fullname and if the file has been moved then close the application with Application.Quit.

    You will need to put the code in a macro called AutoExec or in a form that is called in the Startup parameters.

    the following is basic example of that.

    Dim DP As Variant
     Set DP = CurrentDb
     If DP.Name = "C:\Users\v-padee\Desktop\Database2.mdb" Then
     msgbox "You are in the original source"
     else
     msgbox "You are not in the original source"
     end if 

    so if path not matched then simply close the database.

    if you think any of the suggestion help you to solve your issue then I would recommend you to mark that suggestion as an Answer. 

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, June 6, 2016 1:21 AM
    Moderator

All replies

  • If you just want to protect the VBA code (if any) you can save the database as .accde.

    Otherwise it's tricky: Here are some hints:

    http://answers.microsoft.com/en-us/office/forum/office_2007-access/how-to-protect-microsoft-access-2007-database-from/833304d6-2a7c-407d-8a2e-876ab84dc47c


    Best regards, George

    • Proposed as answer by ryguy72 Sunday, June 5, 2016 2:02 PM
    Friday, June 3, 2016 2:28 PM
  • Hi. Since Access is a file-based system, there isn't really any sure way to prevent someone from copying the files, like you can't stop any one from making a copy of a Word or PDF file, other than to take the computer away from them. Having said that, what you could probably do is make it so it won't function when a copy of the file is installed on another machine. There are several techniques for achieving it. However, none of them is completely hacker proof. Just my 2 cents...
    • Proposed as answer by ryguy72 Sunday, June 5, 2016 2:03 PM
    Friday, June 3, 2016 2:42 PM
  • I understand. Can you point me to where I can find out about the tecniques for making the copy non-functional?
    Friday, June 3, 2016 2:52 PM
  • Thanks George.
    Friday, June 3, 2016 2:57 PM
  • I understand. Can you point me to where I can find out about the tecniques for making the copy non-functional?

    If this is for a commercial product, you might consider this: KeyedAccess

    However, I have no experience with it so I can't comment on the product itself. Good luck!

    Friday, June 3, 2016 3:04 PM
  • Thanks very much.
    Friday, June 3, 2016 5:11 PM
  • Thanks very much.

    You're welcome. George and I were happy to assist. Good luck!
    Friday, June 3, 2016 5:18 PM
  • Hi YFrancis,

    Hi as we already know we can't stop user to copy the Access File but here we have one work around so that user can copy the Access File but will not able to use so that if they have our database then also it's useless for them.

    The idea is to have the database check its location using CurrentProject.Path or CurrentProject.Fullname and if the file has been moved then close the application with Application.Quit.

    You will need to put the code in a macro called AutoExec or in a form that is called in the Startup parameters.

    the following is basic example of that.

    Dim DP As Variant
     Set DP = CurrentDb
     If DP.Name = "C:\Users\v-padee\Desktop\Database2.mdb" Then
     msgbox "You are in the original source"
     else
     msgbox "You are not in the original source"
     end if 

    so if path not matched then simply close the database.

    if you think any of the suggestion help you to solve your issue then I would recommend you to mark that suggestion as an Answer. 

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, June 6, 2016 1:21 AM
    Moderator
  • Thank you Deepak, I will give this a try and if it works, I will surely mark it as the answer.

    YFrancis

    Wednesday, June 8, 2016 1:05 PM
  • If you setup the BE folder to only have traverse permissions, your users will be able to interact with the data, but will not effectively be able to navigate to the folder.  Since they don't actually have access to the folder, they can't copy the  BE, thus the db can't be copied.

    That all said, if security is thus that you are at this point, I think it is time to migrate to SQL Server Express.


    Daniel Pineault, 2010-2012 Microsoft MVP
    http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net

    Wednesday, June 8, 2016 6:09 PM
  • Hi YFrancis,

    Hi as we already know we can't stop user to copy the Access File but here we have one work around so that user can copy the Access File but will not able to use so that if they have our database then also it's useless for them.

    The idea is to have the database check its location using CurrentProject.Path or CurrentProject.Fullname and if the file has been moved then close the application with Application.Quit.

    You will need to put the code in a macro called AutoExec or in a form that is called in the Startup parameters.

    the following is basic example of that.

    Dim DP As Variant
     Set DP = CurrentDb
     If DP.Name = "C:\Users\v-padee\Desktop\Database2.mdb" Then
     msgbox "You are in the original source"
     else
     msgbox "You are not in the original source"
     end if 

    so if path not matched then simply close the database.

    if you think any of the suggestion help you to solve your issue then I would recommend you to mark that suggestion as an Answer. 

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    That can easily be averted if the user is familiar with startup/AutoExec methods. I created a Properties Setter utility that can change database properties and thus bypass startup/AutoExec actions. While it did take time to create the utility the purpose was to show that it can be done.

    Protecting an Access database is like putting a deadbolt on the front door of a house with glass windows. If someone really wants in they will find a way.


    Bill Mosca
    www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    Wednesday, June 8, 2016 6:47 PM
  • Hi Bill ,

    I agree with you that with your utility it can be done but we can make a try because currently we don't have any other work around for this issue.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Proposed as answer by The Rambler Saturday, May 26, 2018 6:40 AM
    • Unproposed as answer by The Rambler Saturday, May 26, 2018 6:41 AM
    Thursday, June 9, 2016 9:23 AM
    Moderator
  • In the past I setup some of my DB's where it checks for the specific computer name and user name. User names and computer names are stored in a definition table. If the combination of those two don't match the database simply won't open. Doing this also gives you the opportunity to give every user certain rights in the database. Only the administrator has access to the definition table where he can add or delete users / define each user's access rights. I keep both the Ribbon and Navigation Pane hidden, only an admin can unhide those. Special functions of course are turned off. For each form the quick menu option is set to off.

    In my latest ones I work with unlock keys. Each user needs to request an unlock key before the database will be functional. If needed you can have it expire after so many days. Part of the key depends on computer hardware, so copying the database to another computer won't work, until a new key is requested and entered.

    Something else to keep in mind. Converting accdb to accde does not secure your tables and queries, unless you have your DB password protected. If you have a spilt database, remember that you'll have to secure both the FE and BE with a password, otherwise tables and queries are still accessible.




    Saturday, May 26, 2018 7:09 AM