How to check for empty table

M

MJ_68123

I am sure that this will be a simple one for many of you, I have hit a
roadblock...

I need a simple way to check an EXISTING table to see if it is EMPTY in "If
Then" coding, returning true or false.

Thanks in advance,
 
D

Dirk Goldgar

MJ_68123 said:
I am sure that this will be a simple one for many of you, I have hit a
roadblock...

I need a simple way to check an EXISTING table to see if it is EMPTY in
"If
Then" coding, returning true or false.


If DCount("*", "YourTableName") = 0 Then
' The table is empty.
Else
' The table is not empty.
End If
 
M

MJ_68123

Thank you Dirk, that worked like a charm. As I thought it would be simple
and quick. Thanks again.
 
Top