Lock Queries

  • I wanted to know if anyone knows a way to lock down a MS Access query.  I have a MS Access database that is used by our entire agency.  We have users who make changes to the query and save the changes.  These changes impact the results for the query.

    Is there any way to prevent a query from being modified?  I would like to set some sort of permission to make the query uneditable.

    Please let me know.

    Thanks!

     

  • While I've never really been able to find a way to do this in Access what we did was make a read only copy of the Access database for users to use and then simply uploaded new versions as needed.  Not pretty, but for the most part it worked.

     

    If the phone doesn't ring...It's me.

  • Frequently Asked Questions About Microsoft Access Security for Microsoft Access versions 2.0 through 2000

    http://support.microsoft.com/default.aspx?scid=%2Fsupport%2Faccess%2Fcontent%2Fsecfaq.asp

    You can hide a lot of stuff including the database window, and turn off all the menu and tool bars except the ones you create yourself.  A determined user (or an Access developer) can get around some of that pretty easily, but it slows down the average user.  Prevents them from getting into design mode. 

    You USED to be able to compile an Access 97 database into an MDE file using a tool that was shipped with the Developer's Edition. You had to display all the queries in forms, and write a menu (switchboard) to display the forms because none of the development tools were included.  It would run on a computer that did not have Access installed.  Of course this also eliminated the user's ability to modify the query, not just his ability to save the changes. 

  • You can control permissions on individual objects if you're willing to implement workgroup security, which is a lot of work just to protect one query.

    You could, however, re-write the sql string every time the database is opened. For example, use an AutoExec macro to run this line of VBA code:

    CurrentDb.QueryDefs("MyQuery").SQL = "SELECT * FROM MyTable"

    Of course, a clever user might find the code and change that, too.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply