Use table field description on form

4.9k Views Asked by At

I would like to display a field's description on a form. How would I accomplish this? For example, table name is tblbureau, field name is Counsel with a description 'General Counsel for the Defense', form name is frmCounsel. I'd like to use a control (textbox?) that displays the full description instead of using the default label for the field name. Thanks.

1

There are 1 best solutions below

1
On

If you have used the form wizards to create the form, any descriptive text is added to the StatusBarText propery. This is even true when you create a blank form and drag fields from the field list to the form. You can refer to this property for your message box, or just refer the user to the statusbar. You can also update the ControlTipText property with the StatusBarText property.

MsgBox Me.ATextBox.StatusBarText

Using the above will save coding to get the description:

Currentdb.TableDefs("atablename").Fields("afieldname").Properties("Description") 

Note that the description property is not available for fields when you have not added a descrition, so the above would cause an error.