goutam
goutam

Reputation: 657

Restrict user access for tables and queries in MS access

I have an MS access database with 4 tables, 4 queries and 1 form.

Is there a way to restrict the users to see only the form when they open the access file. Something on the lines of a password protection to open the tables would also suffice.

Note: I am aware of the Hide Objects and Groups in MS access (https://support.office.com/en-us/article/Manage-database-objects-in-the-Navigation-Pane-04f0708d-c7c7-46bc-8c0a-670751f93d36) but I dont think there is a password protected feature to achieve this, any user who knows how to unhide will be able to view the tables and queries.

Upvotes: 2

Views: 13098

Answers (2)

MoondogsMaDawg
MoondogsMaDawg

Reputation: 1714

If your database is split, you can delete all non-essential objects from one copy of the front-end and distribute it to the problematic user. However, any dependent objects of the form will need to come with it (including linked tables), and if the user knows Access they can still read/write the tables. This also can cause confusion during distribution of new versions, since the DBA will have to maintain multiple versions of the front-end.

The other approach is to hide the navigation pane altogether. I don't mean minimize, but turn it off with VBA using DoCmd.RunCommand acCmdWindowHide. As you mentioned, any user that can run this command in VBA can unhide the navigation pane, but normal users will not be able to unhide it. And if someone can unhide the nav pane in VBA, you should just talk to them about what is allowed/prohibited when using the database to avoid any design changes or bypassing form validations. If they understand Access/VBA to that point, they should comprehend when their actions undermine the platform.

Upvotes: 2

timbmg
timbmg

Reputation: 3328

MS Access provides a couple of start up options. Including to hide and disable many of the features.

Also, you can define a form to open on start up of the file like this:

Access Options > Current Database > Display Form, select the form you want to show up on starting the file.

When scrolling down a little more, you could e.g. disable "Display Navigation Pane", to not show the left hand pane with forms, tables, queries, etc.

BTW, when holding the shift key on starting a file, all start options are disabled.

Check out this video where all the details are explained.

Upvotes: 3

Related Questions