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!

COUNTING RECORDS...counting results of a query 1

Status
Not open for further replies.

mrwendell

Programmer
Aug 22, 2003
43
US
I have a Mainform/mainsub form...the mainform has a cbofindrecord. Once a selection is made the subform display datasheet of the results based on a query of primary table. However, if the results of this query is "nothing" i would like my user that the query did in fact "run" and the results is "nothing". I tried a txtbox on the mainform that is bound to the [coachname] in the control source (=frmTeamCheckSub!CoachName) this works if the results produce a coachname...but if no results are found the textbox remains empty...

I would like the textbox to say "no records found"
what would be ideal is if I could capture the number of records as found in the recordselector box and then run a if/then statement from that result.


Appreciate any input...
 
Have you tried this ?
=Nz(frmTeamCheckSub!CoachName, "no record found")

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top