开发者

Access 2007 VBA : Building a listbox with selection choices from another list box

So there are 8 categories that may be associated to each order, but not necessarily all of them. So i was going to build a list box that allowed the user to double click each of the category they wish to associate when they have an "Order Detail" form opened up (unbound form that has hidden text boxes with all needed ID numbers).

I want to have another empty text box right beside it that will allow me to append the selections (up to 8) so the user can see that they have been added.

So one list box with the default choices, and when a choice is double clicked, it adds that choice to the second list box to see the tally so to speak.

What is the VB for getting some开发者_开发技巧thing like this done?

Thanks Justin


I suggest that you are making life difficult for yourself. Create a subform with the Order Detail table and a combobox that allows the user to select the various categories.


If you want two list boxes --- one for available choices and another for selected items --- and the ability to move items back and forth between available and selected, it can be done with VBA, but is not trivial. See How do I select items using dual list boxes? for an example.

Personally I favor Remou's suggestion if you can make that work for your situation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜