vb listview的列只能显示数字
我的listview与Excel数据库连接,但是有一个很奇怪的事情,有一列只能显示Excel对应列里面的数字,如果其他字符就显示不错来,请问大家要怎样解决?部分代码如下:...
我的listview与Excel数据库连接,但是有一个很奇怪的事情,有一列只能显示Excel对应列里面的数字,如果其他字符就显示不错来,请问大家要怎样解决?
部分代码如下:
rs.MoveFirst
Do Until rs.EOF
If rs.Fields(16).Value = Text11.Text Then
Set X = ListView1.ListItems.Add(, , rs.Fields(3).Value)
X.SubItems(1) = rs.Fields(13).Value & ""
X.SubItems(2) = rs.Fields(15).Value & ""
X.SubItems(3) = rs.Fields(16).Value & ""
X.SubItems(4) = rs.Fields(18).Value & ""
X.SubItems(5) = rs.Fields(19).Value & ""
X.SubItems(6) = rs.Fields(20).Value & ""
X.SubItems(7) = rs.Fields(21).Value & ""
X.SubItems(8) = rs.Fields(12).Value & ""
X.SubItems(9) = rs.Fields(9).Value & ""
End If
rs.MoveNext
loop 展开
部分代码如下:
rs.MoveFirst
Do Until rs.EOF
If rs.Fields(16).Value = Text11.Text Then
Set X = ListView1.ListItems.Add(, , rs.Fields(3).Value)
X.SubItems(1) = rs.Fields(13).Value & ""
X.SubItems(2) = rs.Fields(15).Value & ""
X.SubItems(3) = rs.Fields(16).Value & ""
X.SubItems(4) = rs.Fields(18).Value & ""
X.SubItems(5) = rs.Fields(19).Value & ""
X.SubItems(6) = rs.Fields(20).Value & ""
X.SubItems(7) = rs.Fields(21).Value & ""
X.SubItems(8) = rs.Fields(12).Value & ""
X.SubItems(9) = rs.Fields(9).Value & ""
End If
rs.MoveNext
loop 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询