你要干吗?什么问题啊?是想得到效果吗?
第一个下拉彩旦用select zstyle from table
第二个用select zname from zstyle where zstyle ='"+ComboBox1->Text+"'
第一个下拉彩旦用select zstyle from table
第二个用select zname from zstyle where zstyle ='"+ComboBox1->Text+"'
取出Zstyle,然后添加到下来菜单用一个Query1,设置SQL语句位select Zname from 表 where Zstyle=:Pstyle
然后在第一个下来菜单的ONchange事件写代码
然后传入参数Pstyle的值为第一个下拉菜单的text
然后将找到的Zname循环加到第二个Item里就OK了
set @style = '办公用品'
select * from 表 where Zstyle = @style
好象是在用某门语言写出这样的操作。
取出Zstyle,然后添加到下拉菜单中。第二步,就可以根据你所选取的Zstyle,
把值传递给变量@Zstyle ,然后
select distinct zname from 表 where Zstyle =@Zstyle
莱得到你的第二个列表。。
用:
re.open "select distinct Zstyle from 表"
得到类别,填到combo控件中然后在其click事件中,调用下面的sql语句来查询:
re.open "select * from 表 where Zstyle='" & combo1 & "'"