How can I turn my whole database to Read-only?

ForcedToUseIt

Registered User.
Local time
Today, 21:58
Joined
Jul 25, 2004
Messages
34
Hi,

I have a (.mdb) database and I want users to be able to choose when they enter the database whether they want to use/work with the database or whether they want to just browse through it without them being able to change (or destroy) anything.
I need to put this feature in because people who are new to the database are afraid that they will corrupt/change/destroy something in it if want to browse through it.

So basically what I want is a MsgBox to pop up when you open the database, asking if you want to work or browse through the database.
This is basically what should happen:

1: Work selected: Nothing changes

2: Browse selected: Every form in the database becomes read - only

Does anyone have any ideas on how this can be accomplished in a simple way?

Thanx
 
;) Hello ForceToUseIt!
Look at "DemoReadOnlyA97.mdb

(MStef alias Štef)
 

Attachments

in each textbox associated with a field from the db, you can set the lock property of the textbox control to "True". this way it will not be possible to change de information in form
 
Thanx Mstef!

So the basic procedure is to create a global variable that is on when you want read only and check for it on every form that you open. Looks like a good way to do it without having to do to much work.

Thanx alot
 
You can also right click on a database, go to property, and check the Read Only. This will prevent user from making changes.

hth,

Michael
 
A quick and easy way to do that would be to set up two shortcuts for the users. Once shortcut will open the db as is for editing. The other shortcut will open the db as read only using the /ro command line switch. Here are example Tartget: values for the shortcuts.

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "C:\Test\Database.mdb" /ro

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "C:\Test\Database.mdb"

Check the Access help files for the Startup command-line options for more options and info.
 

Users who are viewing this thread

Back
Top Bottom