Hello all,
I'm getting this error:
The expression you entered as a query parameter produced this error: 'i'
Can I not use my declared variable "i" in Dcount?
ThanksCode:For i = 0 To 51 O(1, i + 1) = DCount("Field1", "Table1", "DateValue([Field1]) Between DateSerial(Forms!Form3!txtYear-1,Forms!Form3!txtMonth,Forms!Form3!txtDay)+(i*7) And DateSerial(Forms!Form3!txtYear-1,Forms!Form3!txtMonth,Forms!Form3!txtDay)+6+(i*7)") Me.Controls("Text" & (i + 1)).Value = O(1, i + 1) Next i