工程-引用-勾选 Microsoft Active Data Objects 2.6 Library
代码部分
dim cn as new adodb.connection
dim rs as adodb.recordset
private sub form_load()
cn.open “provider=microsoft.jet.oledb.4.0;data source=” & app.path & “\123.mdb”
set rs=new adodb.recordset
rs.open“select * from 数据库字段名 where 数据库字段名=`” & trim(text1.text) & “`”,cn
end sub
private sub command_click
if rs.eof=false then msgbox rs(“数据库字段名”)
end sub
手机打的可能有错!