Reputation: 315
This seems like a simple question, but Google doesn't seem to want to give me a direct answer.
I've been given an Access 2016 database with some queries that the owner would like his client to use. When a query is run and displays data, the default is that users can make changes to the displayed data and these changes are saved to the underlying table. Is there a way to protect those tables so that they don't change if the user makes changes?
This has the feel of a simple question, but I can't seem to find a way to lock those underlying tables.
Upvotes: 0
Views: 3207
Reputation: 49264
Well, build a report or a continues items form, and have the users launch hat report (or form). If you use a form, then set the edits = no, and your problem is solved.
You might have to change your start-up settings to hide the navigation pane, and hide all queries etc. (but this is quite easy to do).
Thus you provide a menu form, perhaps custom ribbon, or a form hat simply lets the user select the form or report to launch. That way, users can mess around with the actual query, and the resulting report (or form) can be set to not edit data.
Upvotes: 0
Reputation: 1216
You can use Before Change Data Macro as a workaround
Switch table to Design View and create Before Change Macro, like this:
This macro will instantly revert any changes that user make at YourField or AnotherField. You can lock selected columns only, if you wish.
Adding new records is unaffected. For more details see https://msdn.microsoft.com/en-us/library/office/ff835322.aspx
Upvotes: 0