AutoExec Macro in Access 2010

AlexCS

Board Regular
Joined
Oct 31, 2011
Messages
78
Hi everyone,

Do you know if it is possible to run an AutoExec macro to open a database in read only mode if the username is different than the Admin's username? Please let me know your ideas, I am really new to Access and I wanted to avoid creating a form if possible.

Many thanks!

Alex
 
Last edited:

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Can you clarify what you mean by "read only". What do you want to restrict?
 
Upvote 0
Can you clarify what you mean by "read only". What do you want to restrict?

Hi Xenou and thanks for your time! I would like to only allow the users to see and filter the data, but not to delete or change it.

Cheers, Alex
 
Upvote 0
Hi, I think then that you want to use forms in datasheet view as your tables and/or queries. Forms can be set so that you disallow edits and deletes. A savvy and motivated user could get around that pretty easily, if they were so inclined, so it really just stops people from making changes inadvertently or without thinking about it. If you need higher security you can work with database privileges on a user level (this is a bit of work and I personally have very little experience with it, so I can't help with that).

I guess in principle you could play around with ACL to make the file read-only to most users, and give write access to yourself but I don't know if that would actually work or not (would be interesting to find out). I've never done anything like that either so no personal experience on this front either.

ξ
 
Upvote 0
Thank you for your suggestions Xenou :)..I have tried a few things but everything is either too complicated or does not suit the purpose. In the end I believe I will try to password protect the database and allow users to see the Access data only via query results written directly to Excel. I will post the solution for future reference as soon as I find one.

Have a good day!
Alex
 
Upvote 0

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top