retrieving field description property

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a control on a form where I change the StatusBarText when AllowEdits =
True. How do I retrieve the default StatusBarText when AllowEdits = False?
Description (in the table definition) does not seem to be available as a
property for the underlying field. Is there a way to do this short of
hard-coding the text into the program?

Thank you in advance,
Oli
04.23.06 15.27 hst
 
UncleOli said:
I have a control on a form where I change the StatusBarText when AllowEdits =
True. How do I retrieve the default StatusBarText when AllowEdits = False?
Description (in the table definition) does not seem to be available as a
property for the underlying field. Is there a way to do this short of
hard-coding the text into the program?


Important note: This is one of Access custom properties.
It will not exist if you do not enter something into the
field's Description property. You need to use error
trapping to deal with this situation.

The controls on a form do not pick up these custom
properties once the form is created, but you can get it
from:

CurrentDb.TableDefs!yourtable.Fields!yourfield.Properties!Description

But, it also seems to be available through the form's
recordset so you do not have to embed the table or field
name in your code:

Me.RecordsetClone.Fields(Me.controlname.ControlSource).Properties!Description
 
Back
Top