Dim cmd As SQLCommand
cmd.C
Dim dt As DataTable
cmd.CommandText = "SELECT DISTINCT 区域 From {客户资料}"
dt = cmd.ExecuteReader()
Dim cmb As RibbonMenu.ComboBox = RibbonTabs("内容查询").Groups("精确查询").Items("辖区查询")
Dim vals() As String = dt.GetComboListString("区域").Split("|")
With RibbonTabs("内容查询").Groups("精确查询").Items("辖区查询")
.Items.Clear
For Each val As String In vals
Dim btn As new RibbonMenu.Button(val)
btn.text = val
cmb.Items.Add(btn)
Next
if Vals.length>0 then
.Text= Vals(0)
end if
End Wit