Test for query returning no records

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

Guest

Access 2003. Trying to implement some VBA code (logic) to test if a query
returns zero records. It is not even clear for me how or what I test for.
Obviously if the record count in the query results is zero then my condition
has been found, but I am at a loss as to the "best" If statement to build to
test for this. Is an empty (no records) query result considered a null set,
and will the IsNull function test properly ? Thanks in advance for the great
help always found here.
 
You can simply use DCount() function to check whether the Query returns any
row.

Check Access VB Help on the DCount() function.
 
Back
Top