Checking if a table has records in it

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

Guest

I am trying to check if a table has records in it. If it does not I want to
run an append query if it does I want to go to the next command line. I tried
opening the table and using an isempty command on the first field in the
condition line but it gives me an error saying it doesn't recognize the table
name. Does anyone have any ideas?
 
is this in a macro? If so you could use the Dcount function in the condition
column.
e.g:
DCount("*","yourtable")>0 (this will perform the action as long as you have
any records)

If it is in vb you could use it within an if statement.

hth

Stu
 
Worked like a charm, thanks!

stumac said:
is this in a macro? If so you could use the Dcount function in the condition
column.
e.g:
DCount("*","yourtable")>0 (this will perform the action as long as you have
any records)

If it is in vb you could use it within an if statement.

hth

Stu
 
Back
Top