Runtime Error 462
Runtime Error 462
(OP)
I am doing screen scraping from Reflections and have typically sent the output to Excel and never had a problem. I am now trying to write to Access. Like many of the other threads, I am getting a runtime error 462 every other time I run this code. In trying to solve the problem, I have commented out all code pertaining to recordsets and basically have left the macro as opening and closing and I still get the error. I must be missing something and not closing all references to Access.
Can anyone see something I am missing? Thank you.
Can anyone see something I am missing? Thank you.
CODE --> vba
Sub UpdateTest() Dim rs As DAO.Recordset Dim db As DAO.Database Dim ws As DAO.Workspace dbPath = "S:\Pharmacy General\Databases Automation\Databases\Test\Test.accdb" Set ws = DBEngine.Workspaces(0) Set db = ws.OpenDatabase(dbPath) Set rs = db.OpenRecordset("tblRPHITemp", dbOpenDynaset) ....processing code rs.Close Set rs = Nothing db.Close Set db = Nothing ws.Close Set ws = Nothing Access.Application.Quit End Sub
You don't know what you don't know...
RE: Runtime Error 462
CODE --> vba
You don't know what you don't know...