G
Guest
I have a subform on which I would to do a record count. Vendor_Count is an
unbound field on the subform where I would like to store the count. I tried
putting the following code on the On Current event of the subform:
Vendor_Count=DCount("[Vendor_Nbr]","qry_Zip_Code_Vendors","[Status_Code] =
'Active' and [Peer_Group_Code] <> 11 ")
It isn't working - it's counting ALL records retrieved by the
qry_Zip_Code_Vendors (which is the source of the subform). I would like a
count of the records fitting the criteria above for the records currently
displayed. How can I do this?
Thanks!
unbound field on the subform where I would like to store the count. I tried
putting the following code on the On Current event of the subform:
Vendor_Count=DCount("[Vendor_Nbr]","qry_Zip_Code_Vendors","[Status_Code] =
'Active' and [Peer_Group_Code] <> 11 ")
It isn't working - it's counting ALL records retrieved by the
qry_Zip_Code_Vendors (which is the source of the subform). I would like a
count of the records fitting the criteria above for the records currently
displayed. How can I do this?
Thanks!