且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

两个列表框

更新时间:2023-10-06 14:00:22

在listbox1的AfterUpdate事件中输入一些代码,使用WHERE子句将listbox2.ControSource设置为某个SQL,只选择与listbox1中的值匹配的数据。
In the AfterUpdate event of listbox1 enter some code to set the listbox2.ControSource to some SQL with the WHERE clause, selecting only the data that matches the value in listbox1.



在listbox1的AfterUpdate事件中输入一些代码,将listbox2.ControSource设置为带有WHERE子句的某些SQL,只选择与listbox1中的值匹配的数据。
In the AfterUpdate event of listbox1 enter some code to set the listbox2.ControSource to some SQL with the WHERE clause, selecting only the data that matches the value in listbox1.



轻微修正。


这不是必须重置的listbox2.ControlSource。这应该是空的,除非你想要存储在字段中的值。


这是listbox2.RowSource必须设置为sql语句,其条件基于选择listbox1。

Slight correction.

It''s not the listbox2.ControlSource that has to be reset. This should be empty unless you want the value stored in a field.

It''s the listbox2.RowSource that has to be set to a sql statement with criteria based on the selection in listbox1.


Adrian


你犯了一个错误。你怎么了< grin>


Mary
Adrian

You made a mistake. How unlike you. <grin>

Mary



轻微修正。


这不是必须重置的listbox2.ControlSource。这应该是空的,除非你想要存储在字段中的值。


这是listbox2.RowSource必须设置为sql语句,其条件基于选择ListBox1中。
Slight correction.

It''s not the listbox2.ControlSource that has to be reset. This should be empty unless you want the value stored in a field.

It''s the listbox2.RowSource that has to be set to a sql statement with criteria based on the selection in listbox1.



它的工作原理但看到当我点击listbox1值时,只有list2必须显示值。

每个taskid下的
至少参与其中的人。 list1有4taskid。当我点击该taskid时,它应该在list2中显示4个人的详细信息。

its working but see when i click the listbox1 value only the list2 has to display the value.

under each taskid atleast person involved in it. list1 has 4taskid. when I click that taskid it should display 4 person details in list2.