G
Guest
Hi. I have a recordset, rsDOS, that basically comprises four sales divisions.
The second recordset is part of a looping command below. The looping command
is having trouble with [DivisionID] = " & rsDOS![DivisionID] & ". In both
recordsets, DivisionID is actually a text value ID (unfortunately, my company
uses text for these IDs). For some reason I don't understand, it's saying I
have too few paramenters. Any guidance would be great. Thanks!
Set db = CurrentDb
Set rsDOS = db.OpenRecordset("SELECT * FROM SalesDivision")
If Not rsDOS.EOF Then
Do While Not rsDOS.EOF
Set rsCore = db.OpenRecordset("SELECT * " & _
"FROM [PerformanceDivision] " & _
"WHERE ProductC1ID = 1 AND [DivisionID] = " & rsDOS![DivisionID] & " AND
YearID = " & DatePart("yyyy", Forms!Dashboard!Yesterday) & " AND MonthID = "
& DatePart("m", Forms!Dashboard!Yesterday))
The second recordset is part of a looping command below. The looping command
is having trouble with [DivisionID] = " & rsDOS![DivisionID] & ". In both
recordsets, DivisionID is actually a text value ID (unfortunately, my company
uses text for these IDs). For some reason I don't understand, it's saying I
have too few paramenters. Any guidance would be great. Thanks!
Set db = CurrentDb
Set rsDOS = db.OpenRecordset("SELECT * FROM SalesDivision")
If Not rsDOS.EOF Then
Do While Not rsDOS.EOF
Set rsCore = db.OpenRecordset("SELECT * " & _
"FROM [PerformanceDivision] " & _
"WHERE ProductC1ID = 1 AND [DivisionID] = " & rsDOS![DivisionID] & " AND
YearID = " & DatePart("yyyy", Forms!Dashboard!Yesterday) & " AND MonthID = "
& DatePart("m", Forms!Dashboard!Yesterday))