in macro how to determine a table is empty or number of records=0

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

Guest

The DeleteRecord command returns an error if there is on record in the
underlying table. Therefore I would like to include a condition to stop the
macro.
 
DCount("*","TableName")>0

Above expression will be true if the table has at least one record. Use this
in a Condition to run the DeleteRecord action.
 
Thanks a lot. Much appreciated for your help.


Ken Snell (MVP) said:
DCount("*","TableName")>0

Above expression will be true if the table has at least one record. Use this
in a Condition to run the DeleteRecord action.
 
Back
Top