我有一个要求,用户可以一次选择一些选项。他可以选择一个或多个选项。还有一个称为“其他”的额外字段,通过选择用户可以编写自己的信息而不是选择提供给他的选项。我想在 Access 中的表单上设计此要求。我真的很困惑数据类型应该是什么以及应该如何设计保管箱。请帮我。
1 回答
I'm already wary of the design as far as concatenating these values (your data should be as atomic as possible), but you could create your list box object, and in a button beside it or in after update, you could do
dim values as string
dim item as variant
for each item in me!myListBox.ItemsSelected
values = values & me!myListBox.column(0, item) & ","
next item
I posted this as an answer instead of a comment above so that the code snippet would be more readable.
Edit: I'm just seeing a red flag as far as design goes, it seems like what you want to accomplish would be better implemented using two tables with a one->many relationship. Instead of modeling the data with a multi-select listbox, your continuous subform would house this data.