Sum subform footer with criteria

  • Follow


I have a continuous main form.  In the form header I have an unbound
combobox ([cboLot_Num],1 col only) wth approx 6 selections from a totals
query row source.
I would like to select an item like "LotNo 3" from the combobox, and in the
main form footer, show the count of alll records that meet that criteria in
[Location].  Can't seem to get the syntax right.  Footer field name is
[Lot_Count]
=sum(iif([Location] = "LotNo 3",1,0))  --works
=sum(iif([Location] = [cboLot_Num],1,0))  --fails with #error
There are 20 "LotNo 3" [Location] records.
Tried all kinds of different syntax for refering to [cboLot_Num], but can't
seem to get the calculation to recognize the contents.

Thanks for any help,
John




0
Reply John 3/6/2007 9:13:31 PM


0 Replies
281 Views

(page loaded in 0.021 seconds)


Reply: