M
Matilda
A typical newbie brick wall....
I cannot get code copied from a reference book, or this group, to execute
without error messages.
Can anyone tell me why this is giving me an error?
Function Episodes_List() As Recordset
'This opens a recordset from the Table [Name]
Dim strSQL As String
Dim wksp As DAO.Workspace
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = OpenDatabase("AllTheData")
Set db = CurrentDb
Debug.Print db.Name
strSQL = "SELECT AllTheData.EID,AllTheData.SellDate FROM AllTheData " & _
"WHERE (AllTheData.SellDate > #01/02/2008# );"
Set Episodes_List = db.OpenRecordset(strSQL)
The last line gives an error message saying
'Runtime error 3061, Too few parameters. Expected 1'
I am using DAO 3.6 Object Library and it is above the ADO library reference.
Can't figure out what the problem is and I can't write another line of code
until I find it :-(((
Many TIA's for any advice, Matilda
I cannot get code copied from a reference book, or this group, to execute
without error messages.
Can anyone tell me why this is giving me an error?
Function Episodes_List() As Recordset
'This opens a recordset from the Table [Name]
Dim strSQL As String
Dim wksp As DAO.Workspace
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = OpenDatabase("AllTheData")
Set db = CurrentDb
Debug.Print db.Name
strSQL = "SELECT AllTheData.EID,AllTheData.SellDate FROM AllTheData " & _
"WHERE (AllTheData.SellDate > #01/02/2008# );"
Set Episodes_List = db.OpenRecordset(strSQL)
The last line gives an error message saying
'Runtime error 3061, Too few parameters. Expected 1'
I am using DAO 3.6 Object Library and it is above the ADO library reference.
Can't figure out what the problem is and I can't write another line of code
until I find it :-(((
Many TIA's for any advice, Matilda