在ASP中使用select控件时<option value="Chinese">中国</option>取得的值是Chinese,而不是“中国”而在VB中 Combo1.AddItem "中国" 时
取得的值就是“中国”而无法取得其他形式的值
如果我想在VB中实现类似ASP中这样的功能,如何做呢?
不用用什么 Combox.additme("中国"&vbtb...................."Chinese")!!!!!!

解决方案 »

  1.   

    dim a() as string
    redim a(N)
    for i=1 to N
       Combox.additme rs!字段1
       a(i)=rs!字段2
    next-------------
    保存时用   a(Combox.ListIndex)
      

  2.   

    那就只有另外建立一个数组,与 Combo 控件同步填充。Dim strArr() As StringPrivate Sub Form_Load()
       Combo1.AddItem "中国"
       Redim Preserve strArr(Combo1.ListCount - 1) 
       strArr(Combo1.NewIndex) = "Chinese"
    ......
    End SubPrivate Sub Combo1_Click()
       strTmp = strArr(Combo1.ListIndex)
    End If
      

  3.   

    做两个 combo
    一个显示,一个隐藏combo2.listindex = combo1.listindexstrtemp = combo2.list(combo1.listindex)