hey, I want to open a recordset and use the WHERE part to filter the records I need!
When I call the Openrecordset it gives me a error saying:
"too few parameters, expecting 3"
What is this for, I tried putting all the fields separately in the SQL statement in stead of * and all kinds of other things, but nothing seems to work. What am I doing wrong here?????
build, tm and ty are given in calling the sub and are numbers (long int)
Also, somehow I can't use DAO.recordset but have to use Object when declaring the recordsets. DAO is installed and the dim as Dao.recordset works, but I can't do anything with these recordsets
thanks,
Richard
When I call the Openrecordset it gives me a error saying:
"too few parameters, expecting 3"
What is this for, I tried putting all the fields separately in the SQL statement in stead of * and all kinds of other things, but nothing seems to work. What am I doing wrong here?????
Code:
strSQL = "SELECT * FROM [Financial summary] WHERE ((([Prop ID])=build) AND (([Term month])=tm) AND (([Term year])=ty))"
Set fin = db.OpenRecordset(strSQL)
build, tm and ty are given in calling the sub and are numbers (long int)
Also, somehow I can't use DAO.recordset but have to use Object when declaring the recordsets. DAO is installed and the dim as Dao.recordset works, but I can't do anything with these recordsets
thanks,
Richard