sql 查询所有满足条件数据并赋值
SQL="SELECT*FROMTransWHERECode='"&Text1.Text&"'"Setrs=Selectsql(SQL)IfNotrs.EOFThengx...
SQL = "SELECT * FROM Trans WHERE Code='" & Text1.Text & "' "
Set rs = Selectsql(SQL)
If Not rs.EOF Then
gx = rs.Fields("cIWhCode").Value & ""
Else
MsgBox "请输入!", 48, "错误提示!"
End If
rs.Close
如何查询出满足Text1.Text条件的所有数据,并数据赋值给gx1,gx2 展开
Set rs = Selectsql(SQL)
If Not rs.EOF Then
gx = rs.Fields("cIWhCode").Value & ""
Else
MsgBox "请输入!", 48, "错误提示!"
End If
rs.Close
如何查询出满足Text1.Text条件的所有数据,并数据赋值给gx1,gx2 展开
2个回答
展开全部
我对楼上的回答,再稍作修改
redim gx(rs.recordcount)
dim i as integer
i=-1
while not rs.eof
i = i + 1
gx(i)=rs.Fields("cIWhCode").Value & ""
rs.movenext
wend
redim gx(rs.recordcount)
dim i as integer
i=-1
while not rs.eof
i = i + 1
gx(i)=rs.Fields("cIWhCode").Value & ""
rs.movenext
wend
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
dim gx(),i as integer
SQL = "SELECT * FROM Trans WHERE Code='" & Text1.Text & "' "
Set rs = Selectsql(SQL)
redim gx(rs.recordcount)
while not rs.eof
gx(i)=rs.Fields("cIWhCode").Value & ""
rs.movenext
wend
SQL = "SELECT * FROM Trans WHERE Code='" & Text1.Text & "' "
Set rs = Selectsql(SQL)
redim gx(rs.recordcount)
while not rs.eof
gx(i)=rs.Fields("cIWhCode").Value & ""
rs.movenext
wend
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询