我在list中可能有多项,由项数生成 or 的条件
Dim tj As String
s = xffind.List2.ListCount
If s = 1 Then
tj = xffind.List2.List(0)
End If
If s = 2 Then
tj = xffind.List2.List(0) + " Or 学期 = " + xffind.List2.List(1)
Endif
If s = 3 Then
tj = xffind.List2.List(0) + " Or 学期 = " + xffind.List2.List(1)+" Or 学期 = " +xffind.List2.List(2)
Endif
当xffind.List2.List(0)=第一学期
xffind.List2.List(1)=第二学期
xffind.List2.List(2)=第三学期
时tj="第一学期 Or 学期 =第二学期 Or 学期 =第三学期"
如何生成tj="第一学期" Or 学期="第二学期" Or 学期 ="第三学期"
以利于查询 rsxf.Open "select * from xf where 学期='" & tj & "' and 欠费>0 ", conn, 3, 3
Dim tj As String
s = xffind.List2.ListCount
If s = 1 Then
tj = xffind.List2.List(0)
End If
If s = 2 Then
tj = xffind.List2.List(0) + " Or 学期 = " + xffind.List2.List(1)
Endif
If s = 3 Then
tj = xffind.List2.List(0) + " Or 学期 = " + xffind.List2.List(1)+" Or 学期 = " +xffind.List2.List(2)
Endif
当xffind.List2.List(0)=第一学期
xffind.List2.List(1)=第二学期
xffind.List2.List(2)=第三学期
时tj="第一学期 Or 学期 =第二学期 Or 学期 =第三学期"
如何生成tj="第一学期" Or 学期="第二学期" Or 学期 ="第三学期"
以利于查询 rsxf.Open "select * from xf where 学期='" & tj & "' and 欠费>0 ", conn, 3, 3
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货