&
tb, cnn, adOpenKeyset, adLockOptimistic Select Case rs.Fields(cboFields.ListIndex).Type Case 200 字符数据 If cboOperator.text = "like"
Then sql = tb &
"
where "
&
tb &
"."
&
cboFields &
"
like+ %+"
+ txtdata + "+%"
Else sql = tb &
"
where "
&
tb &
"."
&
cboFields &
cboOperator &
""
+ txtdata + ""
End If Case 135 日期数据 If cboOperator.text = "like"
Then MsgBox "日期型数据不能选用“Like”作为运算符!", , "提示窗口"
cboOperator.ListIndex = 1 End If If IsDate(txtdata) = False Then MsgBox "请输入正确的日期!", , "提示窗口"
rs.Close Exit Sub End If sql = tb &
"
where "
&
tb &
"."
&
cboFields &
cboOperator &
""
+ txtdata + ""
Case 6 货币数据 If IsNumeric(txtdata) = False Then MsgBox "请输入正确的数据!", , "提示窗口"
rs.Close Exit Sub End If If cboOperator.text = "like"
Then MsgBox "货币数据不能选用“Like”作为运算符!", , "提示窗口"
cboOperator.ListIndex = 1 End If sql = tb &
"
where "
&
tb &
"."
&
cboFields &
cboOperator &
txtdata Case 131 数字数据 If cboOperator.text = "like"
Then MsgBox "数字数据不能选用“Like”作为运算符!", , "提示窗口"
cboOperator.ListIndex = 1 End If If IsNumeric(txtdata) = False Then MsgBox "请输入正确的数据!", , "提示窗口"
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-31446-35.html
股民二级市场接盘赔钱
包括广东