如何在MS-Access表单中使用400个字段?

时间:2021-11-15 03:14:01

I understand the maximum number of fields in a MS-Access form is 255. Is there any way to get around this limitation?

我知道MS-Access表单中的最大字段数是255.有没有办法解决这个限制?

I am working with a mental health survey form that has approximately 400 fields.

我正在使用一个有大约400个领域的心理健康调查表。

I would like to create 1 data entry form to allow the mental health interviewer to enter all the responses on the one form.

我想创建1个数据输入表单,以允许心理健康访问者在一个表单上输入所有回复。

I plan to use tabs to facilitate moving through the data entry.

我计划使用标签来方便移动数据输入。

1 个解决方案

#1


The maximum number of fields in an Access recordsource is 255, as is the case with any Jet SQL statement. The limitation on the number of controls on a form is 754 over the life of the form (i.e., deleting a control does not gain you an additional control).

Access记录源中的最大字段数为255,与任何Jet SQL语句的情况一样。表格控件数量的限制在表格的整个生命周期内为754(即,删除控件不会获得额外的控制权)。

The design is clearly not correct, but as is so often the case, we don't get to choose on these things!

设计显然不正确,但通常情况下,我们无法选择这些东西!

In that case, the only solution I can think of is a main form that has one field, the PK, and then a bunch of subforms with subsets of fields, e.g., 100 each. This means you have to be very careful about making sure that your subform saves its edits in its OnExit event (otherwise you'll get write conflicts).

在这种情况下,我能想到的唯一解决方案是具有一个字段PK的主表单,然后是具有字段子集的一组子表单,例如每个字段100。这意味着您必须非常小心确保子窗体在其OnExit事件中保存其编辑(否则您将发生写入冲突)。

And, no, it's not a good design at all.

而且,不,它根本不是一个好的设计。

But it is, at least, a workaround if you're forced to have 400 fields because you have an outside datasource that you can't properly normalize.

但至少,如果您*拥有400个字段,因为您有一个无法正确规范化的外部数据源,那么它至少是一种解决方法。

#1


The maximum number of fields in an Access recordsource is 255, as is the case with any Jet SQL statement. The limitation on the number of controls on a form is 754 over the life of the form (i.e., deleting a control does not gain you an additional control).

Access记录源中的最大字段数为255,与任何Jet SQL语句的情况一样。表格控件数量的限制在表格的整个生命周期内为754(即,删除控件不会获得额外的控制权)。

The design is clearly not correct, but as is so often the case, we don't get to choose on these things!

设计显然不正确,但通常情况下,我们无法选择这些东西!

In that case, the only solution I can think of is a main form that has one field, the PK, and then a bunch of subforms with subsets of fields, e.g., 100 each. This means you have to be very careful about making sure that your subform saves its edits in its OnExit event (otherwise you'll get write conflicts).

在这种情况下,我能想到的唯一解决方案是具有一个字段PK的主表单,然后是具有字段子集的一组子表单,例如每个字段100。这意味着您必须非常小心确保子窗体在其OnExit事件中保存其编辑(否则您将发生写入冲突)。

And, no, it's not a good design at all.

而且,不,它根本不是一个好的设计。

But it is, at least, a workaround if you're forced to have 400 fields because you have an outside datasource that you can't properly normalize.

但至少,如果您*拥有400个字段,因为您有一个无法正确规范化的外部数据源,那么它至少是一种解决方法。