首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

请赐教怎么使用adodc的find方法

2012-03-14 
请赐教如何使用adodc的find方法?程序如下,请将?部分写成具体的源代码:WithAdodc1.ConnectionStringdsnj

请赐教如何使用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

热点排行