I am trying to open a query as a recordset. Can someone please check my code below and see if I have an error?
DoCmd.RunSQL "DELETE * FROM tblAllocations"
Dim rsFGs As DAO.Recordset
Dim rsBOM As DAO.Recordset
Dim rsAllocsData As DAO.Recordset
Set rsFGs = CurrentDb.OpenRecordset("SELECT * FROM qryOpenALLAllocationsSummary", dbOpenDynaset)
Set rsBOM = CurrentDb.OpenRecordset("SELECT * FROM dbo_BMPRDSTR_SQL ORDER BY item_no, seq_no", dbOpenDynaset)
Set rsAllocsData = CurrentDb.OpenRecordset("SELECT * FROM tblAllocations", dbOpenDynaset)
I get an error that says "Run-time error '3061': Too few parameters. Expected 2." on the line that is in bold.
Is there something wrong with my code? Could there be something in my query that is causing this?