Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to determine if a table is empty?

Status
Not open for further replies.

robojeff

Technical User
Joined
Dec 5, 2008
Messages
220
Location
US
Is there a way to determine if a table is empty?

I have a query which creates a table and then I attempt to take the data from the table and place it into an excel worksheet but if the table is empty (no records) I get a "No data error..."

How can I test the table and divert my code from attempting to dump this data into the excel file or a graceful way to rebound from this without stopping the code and/or confusing the user?

thanks
 
Have a look at the DCount function.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top