with data1 .databasename="...mdb" .recordsource="Select * From Table Where ..." .refresh .recordset.findfirst("Name='Jerry'") if not .recordset.nomatch then .recordset.edit .recordset("Name").value="Tom" .recordset.update end if end with'以上演示了Data控件控制Access数据库的大部分常用方法。
.databasename="...mdb"
.recordsource="Select * From Table Where ..."
.refresh
.recordset.findfirst("Name='Jerry'")
if not .recordset.nomatch then
.recordset.edit
.recordset("Name").value="Tom"
.recordset.update
end if
end with'以上演示了Data控件控制Access数据库的大部分常用方法。