rs.open "table",cnstr do while not rs.eof if rs("字段")="局域网" Text.text=Text1.text & rs("字段") end if if rs("字段")="广域网" Text.text=Text2.text & rs("字段") end if rs.MoveNext loop
....................'变量定义省 rs.CursorLocation=adUseClient rs.open "select * from XXX表",cn,3,3 for i=0 to rs.recordcount-1 if trim(rs!网络类型)="局域网" then text1.text=trim(rs!网络类型) end if if trim(rs!网络类型)="广域网" then text1.text=trim(rs!网络类型) end if rs.movenext next i
do while not rs.eof
if rs("字段")="局域网"
Text.text=Text1.text & rs("字段")
end if
if rs("字段")="广域网"
Text.text=Text2.text & rs("字段")
end if
rs.MoveNext
loop
rs.CursorLocation=adUseClient
rs.open "select * from XXX表",cn,3,3
for i=0 to rs.recordcount-1
if trim(rs!网络类型)="局域网" then
text1.text=trim(rs!网络类型)
end if
if trim(rs!网络类型)="广域网" then
text1.text=trim(rs!网络类型)
end if
rs.movenext
next i