开发者

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

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.


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.


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"


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜