I have a simple query that I run to allow a user to do datamining. This simple query will allow the user to change the data. I don't want to allow this. Is there a way to disable edits in a simple select query.
Disable the edit property of a query
Collapse
X
-
In short not from the query.
If you have V2010 there are table level macros
What I would do is the following.
Build a form based on the query and lock down the form.
Now that doesn't prevent the user from opening the query...
So what I do is develop my form based on the query and then copy the SQL behind the query and go directly to the form's properties and paste that into the record sorce then delete the orignal query. I do this quite often... most of my production databases do not have any of the queries available directly to the user, they are all coded into the forms and only added to the querydef collection for certian types of reports, exports, and connection that require resolved objects. -
I would say the best approach would be to setup a form that controls the query, and have the forms AllowEdits set to false.
In short, think of it this way:
Query and tables are for the developer
Forms are really the way Access intends for users to interact with data, and its your job as developer to create the right forms.Comment
-
I agree that's the correct way to approach matters generally, and is well worth bearing in mind. That doesn't necessarily mean it's wrong to disable editing on a query, but the design of the query needn't encapsulate everything required for the form, as the form is the main means of the user interfacing with the data.Comment
Comment