Making viewed records read-only

  • Thread starter Thread starter DubboPete
  • Start date Start date
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
 
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".
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top