设置数据表列标题文本(不使用基础表单中的标签)
我们在 MS-Access 中有一个表单,可以在表单或数据表模式下查看。
表单的排列方式使得某些文本框不需要标签。
然而,在数据表模式下,需要某种列标题,并且采用控件名称的默认行为(如txtRetailPrice)非常丑陋。
有没有办法设置数据表列标题文本,而无需在底层表单上放置标签。正如我所说,表单布局得很好,在其中添加标签实际上会令人困惑。
我希望有一个最好的解决方案,不涉及向表单添加冗余标签。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我知道这是一篇旧帖子,您的问题已经得到解答,但我的回答可能对您有帮助。
您没有提到您的 Access 版本,但在 Access 2010 中,有一个名为“数据表标题”的文本框属性。当您插入空格作为此属性的值时,数据表中的列标题将显示为空白。希望这有帮助。
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:
在我看来,隐藏标签是最好的解决方案。它将保持您的表单整洁并显示您想要的标题。
Hidden labels seems to me to be the best solution. It will keep your form clean and display the headings you want.