Reputation: 109
I want to allow user to update data from form, but not from direct table. I added Before Change event on table, and raising error if the user group is 'basic'. This is working as expected if I enter data in table. But, it is also raising error even if saving data from form. Can anyone help me to resolve this issue?
Thanks in advance!
Upvotes: 0
Views: 1558
Reputation: 1221
In general the way to deal with permissions in Access is to only ever show your users the forms; they should never directly interact with a table or query. So instead of adding Before Change code to your table, you instead want to hide the table.
The things you need are in the Current Database section of the Access options. For this example I'll assume you just have the one form, but the same applies if you have many forms and a "Home" form.
With this done, the user will see only the form interface you selected and the basic data entry toolbar.
Note that when you want to make changes to the file as a developer you must hold down Shift
when opening the application, which will display the navigation pane etc. Of course, any user who knows about the Shift
override could do the same. Which is why distributing in a compiled accde
, which cannot be unlocked, is a good idea. But you need to set up the application using the above options before that matters.
Upvotes: 1