Joe,
Condition would be:
DCount("*","NameOfYourTable")=0
--
Steve Schapel, Microsoft Access MVP
"Joe M." <(E-Mail Removed)> wrote in message
news:72CCBCDD-85C0-420F-80F7-(E-Mail Removed)...
> Hi. I have a macro that uses Transferspreadsheet action to copy a Excel
> spreadsheet into a table. The table is created by the user. Prior to
> importing the spreadsheet I use Delete to empty the table contents. Since
> the
> user may create the spreadsheet incorrectly causing the import to fail
> (meaning zero records will be transferred) I am trying to produce a
> conditional message if there are zero records in the table. What can I put
> in
> the condition column to test the count of the table records (i.e.
> recordcount=0) ? Also the user runs the macro from a shortcut on out
> shared
> drive and not from a form.
>
> Thanks!
> Joe M.
|