Can you make a single field in a query READ-ONLY ?

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

access 2k;

I know you can make the WHOLE query read only;

but was curious if you could make a single, or group of fields
read-only.

(without making a form to do it - just the query)

tia - Bob
 
Bob said:
access 2k;

I know you can make the WHOLE query read only;

but was curious if you could make a single, or group of fields
read-only.

(without making a form to do it - just the query)

A fairly easy way is to wrap the field in an expression. All you need is
any expression with a return value that "looks" the same as using the field
directly. Any of the following would work...

Text Fields:
[FieldName] & ""
Left([FieldName], n) n being the max length of the field.
CStr([FieldName])

Numeric/Date Fields
[FieldName] + 0
[FieldName] * 1
 
Bob said:
access 2k;

I know you can make the WHOLE query read only;

but was curious if you could make a single, or group of fields
read-only.

(without making a form to do it - just the query)

A fairly easy way is to wrap the field in an expression. All you need is
any expression with a return value that "looks" the same as using the field
directly. Any of the following would work...

Text Fields:
[FieldName] & ""
Left([FieldName], n) n being the max length of the field.
CStr([FieldName])

Numeric/Date Fields
[FieldName] + 0
[FieldName] * 1

Wonderful - makes good sense (now) :)

tx Rick;
 
Back
Top