第1个回答 2011-04-11
dim stemp as string
dim rs as adodb.recordset
set rs = new adodb.recordset
if isnull(me.编号)=false then
msgbox "该记录已存在",vbOKOnly + vbInformation, "提示"
else
stemp = "select * from 表名"
rs.open stemp ,currentproject.connection, adOpenKeyset, adLockBatchOptimistic
rs.addnew
rs("字段名1") = me.字段名1
rs("字段名2") = me.字段名2
.
.
.
rs("字段名n") = me.字段名n
rs.UpdateBatch
end if