For where you have:
Chr(10) & Chr(13)
I would replace that with:
vbCrLf
as the vbCrLf is the constant and much easier to work with. Yeah, typos is something we all have to watch out for.
What I was thinking of is the following:
Rs1.Open "SELECT Table.Status, Count(Table.Item) AS CountOfItem " & _
"FROM Table " & _
"GROUP BY Table.Status;",Connection,adOpenDynamic,adLockReadOnly
This shouold produce a recordset that has only as many records as there are how many different status codes, and each record would contain a status code with the number of records in the table that has that status code.
Rs1.MoveFirst
Do While Not Rs1.EOF
Message = Message & vbCrLf & Rs1.Status & ": " & Rs1.CountOfItem
Loop
MsgBox Message, 48
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000
When the going gets tough, the tough gets going.