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

Text box control in report 1

Status
Not open for further replies.

dusteater

Programmer
Aug 15, 2001
13
US
I have a report based on a query. In that report I have a field that has 4 different values ie: Yes, Pending, No, and null. I have a text box in the report footer that I want to display the total number of ocurrences of "Yes" and "Pending". For some reason I cannot get the result of a query into the text box or any other way! I hope you guys can help. I am a proficient VB Programmer but I have a program that need to be totally Access 97. Access has some nice features but also has many strange quirks.
Thanks in advance
Rick
 
You can use the DCount feature to do this, make an unbound text box for each total and set the control sources like so:

=DCount("*","MyQueryFeedingReportName","[MyCategoryFieldName]='Yes'")

=DCount("*","MyQueryFeedingReportName","[MyCategoryFieldName]='Pending'")

HTH Joe Miller
joe.miller@flotech.net
 
Thanks a million! I knew it could be done, but I was trying to do it like I do in VB and that was with the COUNT function. Well now I know!
Thanks a million!
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top