The actual field name

  • Thread starter Thread starter Patrick Stubbin
  • Start date Start date
P

Patrick Stubbin

Can anyone indicate a way to retrieve the actual content
of the field name rather than the value within the field,
i.e., if a field is [NAME1] i want to retrieve the
value "NAME1" and not whatever is in the contents of the
field NAME1

thankyou

patrick stubbin
 
FieldName.Name returns name of field.

FieldName.Value returns value in field.

Value is the default property for FieldName, so FieldName by itself is the
same as FieldName.Value.
 
Patrick said:
Can anyone indicate a way to retrieve the actual content
of the field name rather than the value within the field,
i.e., if a field is [NAME1] i want to retrieve the
value "NAME1" and not whatever is in the contents of the
field NAME1


Where, in what context, are you wantig to do this? It's
kind of difficult to identify which field you want the name
of without knowing the name to start with.

If you're operating on a Recordset, QueryDef or TableDef
object by indexing into the Fields collection, then just
refer to the field's Name property (e.g. .Fields(k).Name)

If it's the name of a field bound to a form/report control,
the conreol's ControlSource property will provide the name
of the field that the control is bound to.
 
Back
Top