Home All Groups Group Topic Archive Search About

How can I protect a field (column in a table) from data entry?

Author
5 Dec 2006 8:19 PM
Lisa
I need to protect a Y/N field from myself essentially.  I do not want this
data changed.  How do I protect the field so that I can view only but not
edit.

Author
5 Dec 2006 8:35 PM
Joan Wild
Don't do any data edits in the table.  Use forms for all data interaction.
You can set the Locked property of the control bound to the Y/N field to Yes
to prevent edits.

--
Joan Wild
Microsoft Access MVP

Lisa wrote:
Show quoteHide quote
> I need to protect a Y/N field from myself essentially.  I do not want
> this data changed.  How do I protect the field so that I can view
> only but not edit.
Author
5 Dec 2006 8:38 PM
Rick Brandt
Lisa wrote:
> I need to protect a Y/N field from myself essentially.  I do not want
> this data changed.  How do I protect the field so that I can view
> only but not edit.

In the table you cannot.  However, you could create a SELECT query that has
all the fields from your table.  For the field you want to protect instead
of just having the field name in the query grid wrap it in an expression.

FieldName: [TableName]![FieldName] + 0

The result in the query grid will be identical to what you see in the table
but since it is based on an expression this particular column will be read
only.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com