Read-only Control Source in Form ?

airmojo

Data Digger
Local time
Today, 17:02
Joined
Jan 16, 2003
Messages
17
Is there a way to display a data field (control source) from a table as a read-only field so that it can not be changed (just viewed) ?

And how does one prevent tabbing to it ?

I can't see anything in the control source property that would make it a read-only data field.

I want to display a 'Date Last Updated' field that is on the table, but I do not want the user to be able to change it, even thought changing it will cause it to be reset to the current date and time since it was changed.

Thanks !
 
Tab Prevention

Firstly to lock the control. Click in the relevant field click properties then select Data Tab and set Locked to YES.

To Prevent user tabbing to a field once again select the properties Tab 'Other' Tab Stop set to NO.

Hope that is what you were after.
Regards,
Phil.
 
The client is using Access 97, so I set 'Tab Stop' to 'No'.
This prevents the tabbing to the field, but one can still just click on the
field to get to it instead of just tabbing to it.

Ideally, one should not be able to click to the field and enter any data.
On the mainframe, we call such a field 'write-protected'.

Any way to 'write-protect' the field ?

Thanks for the ideas !

airmojo

scouser said:
Firstly to lock the control. Click in the relevant field click properties then select Data Tab and set Locked to YES.

To Prevent user tabbing to a field once again select the properties Tab 'Other' Tab Stop set to NO.

Hope that is what you were after.
Regards,
Phil.
 
On Click Property ?

If I can get the 'On Click' property for the 'read-only' data field to react by forcing the tab back to the first data file that would help eliminate the possibilty of the user changing the protected field.

I've searched the access help, but haven't found a way ?

Is there a way to force the tab to jump elsewhere on the form should the protected field be 'clicked' ?

Thanks for the help!

airmojo
 
If it's just a textbox on a form then set it's Enabled property to False, and it's Locked property to True. This way it can't have data input to it, it can't receive the focus, and it won't be tabbed to.
 
Thank you again !

That's what I was needed !

X & O !
 

Users who are viewing this thread

Back
Top Bottom