为数据表子表单创建保存布局按钮 [英] Create a Save Layout Button for Datasheet Subform
问题描述
我想创建一个Save Layout按钮,以便单击此按钮可以保存ColumnOrder,ColumnWidth和ColumnHidden等。对于子表单数据表中的每一列,使用一个带有布局名称的单独布局表。
然后,我可以为单个数据表设置多个布局。我希望通过组合下拉列表框选择这些,然后改变数据表布局。
我知道我可以在VBA中定义这个硬编码。如下面的代码所示。如果更改了列顺序,我不知道如何将这些更改保存回布局表
I want to create a Save Layout button, so that clicking this button saves the ColumnOrder, ColumnWidth and ColumnHidden ect. for each column in the subform datasheet to a seperate layouts table with a layout name.
I can then have multiple layouts set for the single datasheet. I would like these to be selected via a combo drop down list box which in turn changes the datasheets layout.
I know I can define this hard coded in VBA. As show in the code below. If a column order is changed I do not know how to save these changes back to the layout table
推荐答案
要更新布局表,可以运行更新查询。
To update your layout table, you can run an update query.
我想重新排列数据表视图的布局,而不是表格设计。你能详细说明吗?
I want to rearrange the layout of the datasheet view, not the table design. Can you elaborate more please?
我知道,但是你说你在表格中保存了布局信息。或者至少那是它听起来的样子。如果没有,那就是你需要做的。
I know, but you said you saved the layout info in a table. Or at least that''s what it sounded like. If not, that''s what you''ll need to do.
这篇关于为数据表子表单创建保存布局按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!