如何将不重复的字段值加到combo控件中,如果是字段值是null,则不增加。比较字段A中有值a,b,c,a,b,d,e,f,Null,e,我现在只想将a,b,c,d,e,f增加到combo中,请高手帮忙

解决方案 »

  1.   

    strSQL="select distinct A from mytable where A is null"
    set rst=conn.execute(strSQL)
    然后循环填你的控件
      

  2.   

    select distinct companyname from Customers where companyname is not  null------------------
    select distinct 字段A from 表名 where 字段A is not   null
      

  3.   

    rs.open "select distinct field from table where field is not null",……
    do while not rs.eof
      combo1.additem rs.field(0)
      rs.movenext
    loop
      

  4.   

    不只一个字段,怎么利用一个过程把它增加到不到的combo中,
      

  5.   

    rs.open "select distinct field from table where field is not null",……
    do while not rs.eof
      combo1.additem rs.field(0)
      rs.movenext
    loop
      

  6.   

    rs.open "select distinct field from table where field is not null",……
    do while not rs.eof
      combo1.additem rs.fields(0)
      rs.movenext
    loop