CharlieT302
Instructor
Hi Folks,
I have a form with a field that counts the records in an unrelated table (within a query) using the Dcount function. However, the table is actually linked to an Excel spreadsheet.
When the spreadsheet is missing, the calculation returns a #Error value. I would like the calculation to return a zero if the data cannot be found.
I have tried:
IIf(Dcount("ID","Qry_Import")<1,0,Dcount("ID","Qry_Import"))
and
IIF(Isnull(Dcount("ID","Qry_Import")),0,Dcount("ID","Qry_Import"))
I have also tried using the IsError function without success.
Ideas?
I have a form with a field that counts the records in an unrelated table (within a query) using the Dcount function. However, the table is actually linked to an Excel spreadsheet.
When the spreadsheet is missing, the calculation returns a #Error value. I would like the calculation to return a zero if the data cannot be found.
I have tried:
IIf(Dcount("ID","Qry_Import")<1,0,Dcount("ID","Qry_Import"))
and
IIF(Isnull(Dcount("ID","Qry_Import")),0,Dcount("ID","Qry_Import"))
I have also tried using the IsError function without success.
Ideas?