Header in Datasheet View (Access 2003)

N

Norbert Meiss

I dynamically assign values to fields in a datasheet (subform). The fields
are named 'Field_001', 'Field_002' etc. They are filled as expected. In
addition I want to change the header of the fields to a meaningful caption.
Any way to accomplish this? There must be a property to get this done...
TIA, Norbert
 
T

Tom van Stiphout

On Sun, 29 Mar 2009 07:51:01 -0700, Norbert Meiss

Typically you create a datasheet form using textboxes and other
controls that have labels associated with them. For example your
Field_001 control may have a label "lblField_001".
In the same routine where you assign the controlsource for the fields,
also set the label's Caption property (even if intellisense may not be
showing it):
Me.lblField_001.Caption = "myTestCaption"

-Tom.
Microsoft Access MVP
 
N

Norbert Meiss

Thank you, that worked.
Norbert

Tom van Stiphout said:
On Sun, 29 Mar 2009 07:51:01 -0700, Norbert Meiss

Typically you create a datasheet form using textboxes and other
controls that have labels associated with them. For example your
Field_001 control may have a label "lblField_001".
In the same routine where you assign the controlsource for the fields,
also set the label's Caption property (even if intellisense may not be
showing it):
Me.lblField_001.Caption = "myTestCaption"

-Tom.
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top