Set datasheet column header text (without using labels in the underlying form)

15.2k views Asked by At

We have a form in MS-Access which can be viewed either in form or datasheet mode.

The form is arranged in such a way that labels aren't required for some of the textboxes.

In datasheet mode however, some kind of column heading is required and the default behaviour which takes the control name (as in txtRetailPrice) is really ugly.

Is there a way to set the datasheet column header text without putting labels on the underlying form. As I've said, the form is nicely laid out and adding labels in there would actually be confusing.

I'm hoping there is a solution preferably which doesn't involve adding redundant labels to the form.

3

There are 3 answers

2
Barry On BEST ANSWER

I know this is an old post and your question was already answered, but my answer might be helpful to you.

You didn't mention your version of Access, but in Access 2010 there's a textbox property called Datasheet Caption. When you insert a space as a value for this property, the column header in your datasheet will show up blank. Hope this helps.

3
Fionnuala On

Hidden labels seems to me to be the best solution. It will keep your form clean and display the headings you want.

0
bMac On

Since 'Datasheet Caption' shows up as a Design option, there is a property. Simply set the textbox property:

tBox.Properties("DataSheetCaption") = "Whatever you want it to say"