YellowTail
Programmer
I have to count the number records that are in a particlur recordset. I use an array to cycle through the different tables I need to read. Is there a way to skip over a table or recordset if the table or recordset contains no values at this time.
Dim controls(16)
controls(0) = "AC"
controls(1) = "AT"
For Each i In controls
Set db = CurrentDb()
Set rec = db.OpenRecordset("3_" & i & "_In_Place", dbOpenDynaset)
adOpenDynamic
rec.MoveLast
rs = rec.RecordCount
Next
Dim controls(16)
controls(0) = "AC"
controls(1) = "AT"
For Each i In controls
Set db = CurrentDb()
Set rec = db.OpenRecordset("3_" & i & "_In_Place", dbOpenDynaset)
adOpenDynamic
rec.MoveLast
rs = rec.RecordCount
Next