vb combo access数据读取问题
能够通过combo下拉列表将数据添加到access数据库,修改也成。就是数据查询后显示老报错。。希望知道的能给解释一下。下面是查询的代码。。谢谢了。PrivateSubs...
能够通过combo下拉列表将数据添加到access数据库 ,修改也成。就是数据查询后显示老报错 。。希望知道的能给解释一下。下面是查询的代码。。谢谢了。
Private Sub shoppingshow(SQL As String)
Dim i As Integer
Dim r As Integer
Call spshowload
Call Module1.opendatabase
rs.Open SQL, conn, 1, 1
r = rs.RecordCount
If Not rs.EOF Then
For i = 1 To r
FG1.Rows = rs.RecordCount + 1
FG1.TextMatrix(i, 0) = i
FG1.TextMatrix(i, 1) = rs("CX_no")
FG1.TextMatrix(i, 2) = rs("CX_uname")
FG1.TextMatrix(i, 4) = rs("CX_amount")
FG1.TextMatrix(i, 3) = rs("CX_gname")
FG1.TextMatrix(i, 5) = rs("CX_length")
FG1.TextMatrix(i, 6) = rs("CX_width")
FG1.TextMatrix(i, 7) = rs("CX_height")
FG1.TextMatrix(i, 8) = rs("CX_weight")
FG1.TextMatrix(i, 9) = rs("CX_route")
FG1.TextMatrix(i, 10) = rs("CX_times")
FG1.TextMatrix(i, 11) = rs("CX_date")
FG1.TextMatrix(i, 12) = rs("CX_money")
FG1.TextMatrix(i, 13) = rs("CX_cno")
FG1.TextMatrix(i, 14) = rs("CX_certificate")
FG1.TextMatrix(i, 15) = rs("CX_remark")
FG1.TextMatrix(i, 16) = rs("CX_renyuan")
FG1.TextMatrix(i, 17) = rs("CX_shoufei") '通过combo提交到数据库没问题,但是查询时候显示出错,其他查询显示的列都没问题
rs.MoveNext
Next
Else
MsgBox ("没有记录!")
End If
End Sub 展开
Private Sub shoppingshow(SQL As String)
Dim i As Integer
Dim r As Integer
Call spshowload
Call Module1.opendatabase
rs.Open SQL, conn, 1, 1
r = rs.RecordCount
If Not rs.EOF Then
For i = 1 To r
FG1.Rows = rs.RecordCount + 1
FG1.TextMatrix(i, 0) = i
FG1.TextMatrix(i, 1) = rs("CX_no")
FG1.TextMatrix(i, 2) = rs("CX_uname")
FG1.TextMatrix(i, 4) = rs("CX_amount")
FG1.TextMatrix(i, 3) = rs("CX_gname")
FG1.TextMatrix(i, 5) = rs("CX_length")
FG1.TextMatrix(i, 6) = rs("CX_width")
FG1.TextMatrix(i, 7) = rs("CX_height")
FG1.TextMatrix(i, 8) = rs("CX_weight")
FG1.TextMatrix(i, 9) = rs("CX_route")
FG1.TextMatrix(i, 10) = rs("CX_times")
FG1.TextMatrix(i, 11) = rs("CX_date")
FG1.TextMatrix(i, 12) = rs("CX_money")
FG1.TextMatrix(i, 13) = rs("CX_cno")
FG1.TextMatrix(i, 14) = rs("CX_certificate")
FG1.TextMatrix(i, 15) = rs("CX_remark")
FG1.TextMatrix(i, 16) = rs("CX_renyuan")
FG1.TextMatrix(i, 17) = rs("CX_shoufei") '通过combo提交到数据库没问题,但是查询时候显示出错,其他查询显示的列都没问题
rs.MoveNext
Next
Else
MsgBox ("没有记录!")
End If
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询