Making viewed records read-only

D

DubboPete

Hi all,

I want to be able to allow users to access all records in a particular
table in a database, but whilst using the same form for data-entry and
viewing existing entries, I would like to be able to restrict the
viewing to read-only.

Is it possible to switch on a read-only flag through code?

thanks in anticipation

DubboPete
 
B

Bob Hairgrove

Hi all,

I want to be able to allow users to access all records in a particular
table in a database, but whilst using the same form for data-entry and
viewing existing entries, I would like to be able to restrict the
viewing to read-only.

Is it possible to switch on a read-only flag through code?

thanks in anticipation

DubboPete

Check out the help topic for the form property called "AllowEdits".
 
D

Douglas J. Steele

Set the form's AllowEdits property to False. If you don't want them to be
able to delete existing entries either, se the AllowDeletions to False as
well.
 
D

DubboPete

thanks guys,

I added into the relevant combo box after update property (where
previous record was selected to be viewed) the following:

AllowEdits = false
AllowDeletions = false

and that did the trick!

I also included an if...then... where if the logged in user matched the
record's username entry, then they had the ability to edit but not
delete.... so fixed three birds with one stone there!

thanks guys once again!

DubboPete
 
Top