Hi all
My code is working fine. I just need help with looping
the rst.move
Dim rst As Recordset
Dim varCXL1, varCXL2, varclx3, varCXL4, varCXL5 As Integer
Set rst = CurrentDb.OpenRecordset("qry_cxlcount")
rst.MoveFirst
varCXL1 = rst!countcxl
rst.MoveNext
varCXL2 = rst!countcxl
rst.MoveNext
varCXL3 = rst!countcxl
rst.MoveNext
varCXL4 = rst!countcxl
rst.MoveLast
varCXL5 = rst!countcxl
set rst = Nothing
Can I loop "move" to make it look better
salad - 05 Apr 2006 22:26 GMT
> Hi all
>
[quoted text clipped - 18 lines]
>
> Can I loop "move" to make it look better
Dim ar(5)
Set rst = CurrentDb.OpenRecordset("qry_cxlcount")
rst.MoveFirst
For i = 1 to 5
ar(i) = rst!Countcx1
rst.MoveNet
Next
set rst = Nothing
congngo@yahoo.com - 06 Apr 2006 05:02 GMT
does not work
error message "object required"
congngo@yahoo.com - 06 Apr 2006 05:05 GMT
nevermind I misstyped the word "rst!countcxl1"