I have an Access continuous form. I would like to change the forecolor of a specific record\'s field.
I have the field to highlight from the FieldModified field. So for
You can't use a String
variable like this, fldName
is an identifier holding a String
value.. not an identifier - in Me.ControlName
, both Me
and ControlName
are identifiers.
But not all hope is lost! You can use a String
to pull a Control
object from a form!
All form controls should exist in the form's Controls
collection, keyed by name:
Me.Controls(fldName).ForeColor = vbRed