Any way to get the Caption text for a field?

smagnotta

New member
Local time
Today, 11:32
Joined
Mar 1, 2006
Messages
8
All,

I am trying to get the caption text for a field instead of the raw database name. The raw database name can be extracted using the Fields Collection:

Fields.Item(w).Name

Is there a way to retrieve the caption, as this makes more sense to the user?

For example, instead of the field name "numEmp", I want to retrieve "Number of Employees".

I need this because I am creating a form at runtime (on the fly).

Thanks,
Sal
 
It said Method or data member not found

rs.Fields.Item(w).Caption <-- does not exist
 
I also tried:

rs.Fields.Item(w).Properties("Caption") and it compiles but

I get a run time error 3265: Item cannot be found in the collection corresponding to the requested name or ordinal.

I'm doing something stupid.
 
That ain't the caption, its the DESCRIPTION if it is in the .Fields collection.

Caption is a Forms/Reports property.

Try using the right property name.
 

Users who are viewing this thread

Back
Top Bottom