Hi,
I wrote this simple code:
Sub DBDELETE_SQL(Path As String, Table As String, SQL As String)
Dim DB As Database
Dim RS As Recordset
Set DB = OpenDatabase(Path)
Set RS = DB.OpenRecordset(Table, dbOpenTable)
DB.Execute SQL
RS.Close
Set RS = Nothing
DB.Close
Set DB = Nothing
End Sub
I call the sub in this manner:
...
SQL = "Select * from History where ID=3 and Date=" & Chr(34) & "2013-03-10 - 2013-03-16" & Chr(34)
Call DBDELETE_SQL("C:\GoogleTrends3.mdb", "History", SQL)
...
I get this error: Run-time-error '3065': Application-defined or object-defined error
What is wrong??
Thank you, for any help!
Lloyd
Bookmarks