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

Test Query for Records

Status
Not open for further replies.

FrankPV

Technical User
Oct 11, 2000
20
US
Hello!
I have a form that displays a msgbox if a query has any records. The query executes when the user exits the combo box. If there are any records in the query I want to display a msgbox. If the query is empty I want to skip the msgbox. I don't know the proper VBA code to test whether the resulting query has any records. Any help would be appreciated. Thank you.
 
Check out the DCount function. Sounds like what you need. Maq [americanflag]
<insert witty signature here>
 
Thank you. This is exactly what I was looking for and it works fine.

Frank
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top