从列表框中选择多个项目 [英] choose multiple items from list box
问题描述
Access 2007如何允许用户从下拉列表或列表框中选择多个项目? 我可以使用.例如,我在表单中添加了一个列表框,并将其绑定到表单所来自的查询的字段中.现在,用户需要能够在列表框中选择2-3个值.
Access 2007 How do I allow the user to pick multiple items from a dropdown or list box? I can use either. Example, I add a list box to my form and make it bound to a field from the query the form was made from. Now the user needs to be able to pick 2-3 of the values in the list box.
我知道在列表框属性(多选)中,我可以选择简单或扩展,但这不会保存选择.
I know that in the listbox properties (Multi Select) I can pick simple or Extended, but this does not save the choices.
谢谢
推荐答案
在Access MDB数据库格式中,我认为不可能有一个绑定列表框,该列表框也是多选的. (测试表明,可以设置multi-select属性...但是没有任何内容存储在绑定字段中...因此它没有用.)db引擎应该存储多个选择的值中的哪个?
In the Access MDB database format, I don't believe it's possible to have a bound list box which is also multi-select. ( Testing showed me it is possible to set the multi-select property ... but nothing gets stored in the bound field ... so it's not useful.) Which of multiple selected values should the db engine store?
由于具有Access 2007,因此可以使用ACCDB格式,并且如果将它绑定到多值字段,则可以具有多选列表框.但是,多值字段与查找字段太相似,并且查找字段是有害的. (表中查找字段的弊病).
Since you have Access 2007, you can use ACCDB format, and you might be able to have a multi-select list box if it's bound to a multi-value field. However, multi-value fields are too similar to lookup fields, and lookup fields are evil. (The Evils of Lookup Fields in Tables).
如果是我,我会为用户界面选择其他方法.
If it were me, I would choose a different approach for the user interface.
这篇关于从列表框中选择多个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!