I used your routine with one of my tables.
You are using rs and rst in different places. I made them all rst
This works for me
Code:
Private Sub LoadArray()
Dim db As Variant
Dim rst As Variant
Set db = CurrentDb
Set rst = db.OpenRecordset("animal")
'("JobT")
With rst
Debug.Print .RecordCount
.Close
End With
Set rst = Nothing
Set db = Nothing
End Sub
I did have to retype the entire line
Code:
Set rst = db.OpenRecordset("animal")
Access/vba colored the line red indicating a syntax issue -retyping removed it and processed to give a correct count???