能否将表中的一个字段内容分别显示到两个text中????
能否将表中的一个字段内容分别显示到两个text中
例如:
一个字段内有内容:局域网 广域网 两项内容
让一个text内容为:局域网
让一个text内容为:广域网
如能 请赐教:::
问题点数:0、回复次数:7Top
1 楼czjw(寒雪)回复于 2003-05-04 08:40:55 得分 0
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
Top
2 楼chenyu5188(来自东方的狼)回复于 2003-05-04 08:50:23 得分 0
....................'变量定义省
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
Top
3 楼Seiya_(星矢)回复于 2003-05-04 12:06:22 得分 0
gzTop




