I had been using the following query since a while in my access form and it was working fine till now.. but now I am getting error "Too few parameters. Expected 1"
sqlGrpCd = "SELECT Group_Id FROM Tbl_Payment_Group Where Trim(Eff_Dt) <> '' and Exp_Dt >= " & Date & " ORDER BY Group_Id DESC"
Set rsGrpCd = CurrentDb.OpenRecordset(sqlGrpCd, dbOpenSnapshot)
On further analyzing, I found that the query piece "and Exp_Dt >= " & Date & "", is the cause for error. The Date comes out as '15-Oct-15' and the query on execution, looks like:
select Group_Id from Tbl_Payment_Group where trim(eff_dt) <> '' and Exp_Dt >= 15-Sep-15 order by Group_Id Desc
Table Data looks like:
Group_Id: Rate: Eff_Dt: Exp_Dt
G1: 1100: 01-Oct-15: 30-Dec-15
and Table structure as:
Group_Id - Text
Rate - Number
Eff_Dt - Date/Time
Exp_Dt - Date/Time
Please advice. TIA.