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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

test for empty dataset

Status
Not open for further replies.

jmnekrkt

Programmer
Feb 21, 2002
47
US
How can I tell if a dataset is empty before I run a query. I don't want to run the query if there are not records to show.
 
Do a DCOUNT(.....) You can get the info on it thru HELP


rollie@bwsys.net
 
Use the .recordcount property. Also, be aware that if you're using DAO rather than ADO, you'll have to .movefrist .movelast in order to get an accurate count (old DAO bug, but if you're only workgrouping or running local, it's less overhead than an ADO connection).
 
DCount did the trick. Thank you both for your suggestions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top