How to make a field value read-only

  • Thread starter Thread starter Wonixen
  • Start date Start date
W

Wonixen

Hi!

I have a table with a column representing the time it was
created. I used default value: now(). this work fine, but
not 100% satisfatory.
first I'd like that field to always take the date/time of
when it was created.

Second I want that value not to be modifyable (once
created it becomes read only.

How can I do that ?

Thanks
 
hi,
all you have to do is go into the properties for the field, and click
on the tab on top that says Data.
They under the line that says Locked , change it to yes.

This will hold the date value that the field was initiated at and will
not allow it to be changed.


kevin
 
Hi!

I have a table with a column representing the time it was
created. I used default value: now(). this work fine, but
not 100% satisfatory.
first I'd like that field to always take the date/time of
when it was created.

A Default property will be applied at the instant the record is
created. Are you seeing something else?
Second I want that value not to be modifyable (once
created it becomes read only.

How can I do that ?

You can't, if you allow users access to Tables. If you implement
Access security and let users interact with data only via a Form, you
can display the timestamp field in a textbox with its Locked property
set to True - they can see it but not change it. (Tables have no such
properties).
 
Try setting the control's locked property to yes. You can
also change the enabled property to no with or without
setting the locked property to yes. These fixes only work
while using a form. It doesn't prevent someone going
behind the form, into the table and changing the data.
You have to secure the database in other ways to prevent
them from doing that as well.
 
Back
Top