请赐教如何使用adodc的find方法?
程序如下,请将?部分写成具体的源代码:
With Adodc1
.ConnectionString = "dsn=jczx "
.RecordSource = "Select * from 学号 "
.Refresh
End With
'text1用来接受学号
If Adodc1.Recordset.Find (学号=text1.text,?,?,? )=? Then
MsgBox "此学号已存在,请重新输入 "
end if
先谢谢各位了!
[解决办法]
Adodc1.Recordset.Find "学号=text1.text "
if not Adodc1.Recordset.eof then
msgbox "此学号已存在,请重新输入 "
end if
[解决办法]
Adodc1.Recordset.Find "学号= " & " ' " & rtrim(me.text1.text) & " ' "
if not Adodc1.Recordset.eof then
msgbox "此学号已存在,请重新输入 "
end if