Results 1 to 9 of 9
  1. #1
    concurrent is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2015
    Posts
    3

    how to secure database from editing?

    how can i secure forms and queries from editing from other authorized users in Access 2007? also how to protect saved records from deleting?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    The simplest thing to do is to put the database in a network folder and assign permissions to the folder on the NETWORK level, I think that's the only method that's reliably worked for me.

    If a person has read/write access to your database, there is no real way to deny them the ability to delete a record, but you can mitigate that a few ways.

    1. Hide all tables
    2. Create data entry forms as your user interface rather than allowing direct access to the tables.
    3. Require a login to the database (either password protect the entire database or use some VBA code to create your own login security).

  3. #3
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    I believe this can be all be bypassed by any user that holds shift while opening the database.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    If he sets the security at the network level (first suggestion) people will not be able to change/add data I've got a couple of databases we set up this way.

    For the remaining items (the numbered ones) you are correct, if someone knows what they are doing in access you can circumvent a lot of things but that depends on the audience your database is targetting.

    Another method would be to put a password on the database itself, then nobody could get into it without the password but that's a little clumsy.

  5. #5
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    You may be able to promote the database front end to an asp.net dynamic data entities web site. This could give you the protection from the UI being changed by the user and you would have control to lock out records from being deleted. check out <- link. The scaffolding option could get you up and running pretty quick.

  6. #6
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    Security is like an onion. there are layers - and the right answer for you depends on how sophisticated is your users - vs - how much hassle you want to maintain on an ongoing basis.... stopping hard core crackers is more involved than preventing clueless user errors..... so the answer can be anything from locked fields in forms to encrypted/password protected files. But basically be sure all users are in forms - never directly in tables - and then this is your control point.

  7. #7
    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
    Quote Originally Posted by NTC View Post
    Security is like an onion. there are layers - and the right answer for you depends on how sophisticated is your users - vs - how much hassle you want to maintain on an ongoing basis...But basically be sure all users are in forms - never directly in tables - and then this is your control point...
    Exactly! If you ride a classic sports car, you might spend $5000 for a state-of-the-art security system; if your ride is a ten year-old banger, probably not! And one of the problems, here, is that the OP hasn't really spelled out what he or she is trying to protect against; accidental changes or intentional ones.

    Since it is obviously in a multi-user environment, it needs to be Split into a Front End/Back End configuration, which should pretty much resolve the question of direct user access to Tables.

    The Front End should then be converted to an accde file; this will prevent design changes to the Forms. With all access to Records being made through Forms, defeating Deletion attempts is easy:

    Code:
    Private Sub Form_Delete(Cancel As Integer)
     MsgBox "Deletion of Saved Records Is Not Allowed!"
     Cancel = True
    End Sub

    The real problem is securing the Queries against modification, and I'm not real sure how, in Access, itself, you could do that. Even in an mde/accde file Queries can be changed, the theory being that anyone with enough knowledge to do that should be able to, to suit his individual needs. The important thing to remember is that in a Split database, with each user having their own copy of the Front End on their PC, they will only be modifying their copy of the Query, no one else's.

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

    All posts/responses based on Access 2003/2007

  8. #8
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    one can remove the navigation pane availability to protect queries.... in the Options/Current Database - uncheck the Use Special Keys choice.....

    bottom line: Access can be as secure as one needs - it just requires more management as one climbs the ladder of higher and higher security....

  9. #9
    jtm013 is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Aug 2014
    Posts
    117
    Quote Originally Posted by Perceptus View Post
    I believe this can be all be bypassed by any user that holds shift while opening the database.
    This can be taken care of using:

    Code:
    Function ap_DisableShift()
    'This function disable the shift at startup. This action causes
    'the Autoexec macro and Startup properties to always be executed.
    
    
    On Error GoTo errDisableShift
    
    
    Dim db As DAO.Database
    Dim prop As DAO.Property
    Const conPropNotFound = 3270
    
    
    Set db = CurrentDb()
    
    
    'This next line disables the shift key on startup.
    db.Properties("AllowByPassKey") = False
    
    
    'The function is successful.
    Exit Function
    
    
    errDisableShift:
    'The first part of this error routine creates the "AllowByPassKey
    'property if it does not exist.
    If Err = conPropNotFound Then
    Set prop = db.CreateProperty("AllowByPassKey", _
    dbBoolean, False)
    db.Properties.Append prop
    Resume Next
    Else
    MsgBox "Function 'ap_DisableShift' did not complete successfully."
    Exit Function
    End If
    
    
    End Function
    As others have said it is an onion. My own case simply required hiding access to navigation and menus, requiring users to use form based navigation and using vba to create a login screen which grants users permissions based on stored values in a login information table.

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

Similar Threads

  1. Need help editing Database via Form
    By ismith in forum Forms
    Replies: 1
    Last Post: 01-04-2012, 02:57 PM
  2. Editing Primary Key in Split Database
    By jaypoppin in forum Access
    Replies: 10
    Last Post: 03-16-2011, 10:39 AM
  3. How to secure my data of my database
    By access1234 in forum Access
    Replies: 2
    Last Post: 02-15-2011, 04:18 AM
  4. How to secure the data of my Database
    By access1234 in forum Reports
    Replies: 2
    Last Post: 02-14-2011, 03:03 PM
  5. open a secure database
    By ngeng4 in forum Security
    Replies: 5
    Last Post: 08-01-2010, 10:57 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