在数据表对象中使用ColumnHidden属性 [英] using ColumnHidden properties within Datasheet objects

查看:167
本文介绍了在数据表对象中使用ColumnHidden属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 MS Access 表单和一个 Datasheet 子表单.
使用代码,可以更改其各个列的 ColumnHidden 属性. 但是,当我关闭表单时,系统会询问我是否保存数据表表的表布局.

I have a MS Access form with a Datasheet subform.
Using code, I change the ColumnHidden property of various of its columns. But, when I close the form, I'm asked whether to save the table layout of the Datasheet's table.

  • 如何停止要求用户连续更改表布局的表单?
  • 除了将数据表更改为常规子窗体外,我别无选择吗?

推荐答案

如果您始终隐藏相同的列,请创建一个仅包含要显示的列的查询,并将其用作子窗体的源.

If you are always hiding the same columns - create a query that only has the columns you want displayed and use that as the source of your subform.

如果您仍然需要一些隐藏字段(子键等),则必须创建常规表单.还不错:

If you still need some hidden fields (child keys, etc.) you will have to create a regular form. It's not too bad:

  • 仅将其放在您的桌子上
  • 将您的列拖到表单上(格式和位置无关紧要)
  • 将其设置为数据表视图
  • 编辑标签(这些将成为列标题)
  • 更改制表符顺序(控制列的显示顺序)
  • 查看数据表并隐藏所需的列
  • 保存表格
  • 将此表单作为子表单添加到主表单中

这篇关于在数据表对象中使用ColumnHidden属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆