For Each tempQuery In CurrentDb.QueryDefs
'for each query in the database
If InStr(tempQuery.Name, "TMP") = 0 Then
'avoid picking up temp queries,
'via substring check
ColumnCount = CurrentDb.QueryDefs(tempQuery.Name).Fields.Count
'get the column count for the query
RowCount = DCount("*", tempQuery.Name)
'get the row count for the query
MsgBox(tempQuery.Name + vbTab + _
Str(ColumnCount) + vbTab + Str(RowCount))
End If
Next
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment