How to tell if table is empty

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to find out if a table is empty. I've tried using the
recordclone event and it works. But I need to know if the table is empty
before I open the form (using the recordclone). Is there a function similar
to isempty for tables?
 
VBAgroupie said:
I would like to find out if a table is empty. I've tried using the
recordclone event and it works. But I need to know if the table is
empty before I open the form (using the recordclone). Is there a
function similar to isempty for tables?

Simplest is to do a DCount on the table:

If DCount("*", "YourTableName") = 0 Then
' the table is empty
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top