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!

Limit Records Based on Section Footer Count()

Status
Not open for further replies.

Hillary

Programmer
Feb 15, 2002
377
US
I want my report to only show records (Section Header and Details) where the formula in the Section Footer is > 1. The formula is...

=Count([Unit Cost])

I don't know VB.

Thanks,

Hillary
 
is [Unit Cost] a filed in your query? you may need to set this in your query.

in the criteria section for Unit Cost include:

> 1

hope this helps you.
 
sorry, i meant "field" not filed like in my first sentence.
 
[Unit Cost] is in my query but is grouped. What I am trying to do is make a report that shows all Inventory Transactions dated 9-30-03 where there are different costs. My query is Part ID, Transaction Date and Unit Cost. Part ID and Unit Cost are set to Group By and Transaction Date has a criteria of 9-30-03.

In my report, Part ID is in a Section Header and Unit Cost is in the Details. A Part ID may have multiple Unit Costs. So, I created a Section Footer and placed a field with the formula =Count([Unit Cost]). I only want to see records which have more than 1 Unit Cost.

Thanks for your help.

Hillary
 
The footer section is not going to do anything for you. Since the header and detail are printed before the footer is run, whatever testing you do in the footer can only affect following records which will pass through the next iteration of the header section.

cghoga is correct. If you use the criteria you won't need the calculated field in the footer. If the only records that make it into the report have a Unit Cost > 1, you don't need to test for that cost within the report.

Also, =Count([Unit Cost]) would count the number of times a record with a Unit Cost field appeared for a particular PartID. Since all your Detail records have this field, it's the same as counting all the records for that PartID which appear on the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top