我在点击时运行此代码,Dim R As Recordset
时出现错误:
Private Sub Command12_Click()
Dim R As Recordset
Set R = CurrentDb.OpenRecordset("SELECT * FROM [tblLogData]")
R.AddNew
R![Data] = "Log entry" & Me.tDate.Value
R.Update
R.Close
Set R = Nothing
DoCmd.Close
End Sub
答案 0 :(得分:0)
如果这样做不能删除错误:
Dim R As DAO.Recordset
您缺少对 Microsoft Office xx.0 Access数据库引擎对象库的引用。