如何刷新基于第一个列表框的表单中的多个列表框? [英] How to refresh multiple listboxes in a form based on the 1st listbox?
本文介绍了如何刷新基于第一个列表框的表单中的多个列表框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个包含4个列表框的表单,当用户在第一个列表框中选择某些内容时,我需要动态刷新它们。我需要确保所有其他三个框根据第一个框选择更改它的值而不单击任何提交按钮。
I have a form that has 4 list boxes and I need to refresh them on the fly when user select something in the first listbox. I need to make sure that all the other three boxes change it''s value based on the 1st box selection without clicking any submit button.
推荐答案
我必须我自己做这样的事。我发现此链接很有帮助。他们使用组合框,但您可以进行一些调整以使其与列表框一起使用。
希望这有帮助
http://www.databasedev.co.uk/filter_combo_boxes.html
I have had to do something like this myself. I found this link helpful. They use combo boxes but you could make some adjustments to get it to work with list boxes.
Hope this helps
http://www.databasedev.co.uk/filter_combo_boxes.html
将一些代码放入 AfterUpdate 事件中第一个为每个其他ListBox调用 .Requery()的ListBox。类似于:
Put some code in the AfterUpdate event of the first ListBox that calls a .Requery() for each of the other ListBoxes. Something like :
展开 | 选择 | Wrap | 行号
@NeoPa
全部,
Listbox2需要根据listbox1的选择进行刷新。如果我这样做,它就行不通。有什么建议吗?
@NeoPa
All,
Listbox2 needs to be refreshed based on the listbox1''s selection. If I do the above it doesn''t work. Any suggestions?
这篇关于如何刷新基于第一个列表框的表单中的多个列表框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文