L
Lori
I have a field called Current Openings on a form based on a table called
tbl_Zip_Code. This field should count the number of active vendors within a
zip code, local agency combination.
I got this to work on my subform (it counts all records regardless of zip
code and LA Nbr):
=DCount("[Vendor_Nbr]","qry_Zip_Code_Vendors","[Status_Code] = 'Active' and
[Peer_Group_Code] = 11")
I need to make it work within the current openings field to narrow the count
to each zip code, LA Nbr combination (which is what each record in the form
is based on) - how can I do this? Do I add to the criteria portion of the
function?
Sub_frm_vendor_zip_code is on my form and is based on a query called
qry_vendor_zip_code (run off of the tbl_vendor). This subform displays all
vendors for the zip code displayed on the form by linking the p_zip_code and
LA_Nbr fields in tbl_vendor to the zip_code and LA_Nbr fields in tbl_zip_code.
Thanks for any help - I know this is a lot of info - I was trying to provide
any help I could give. Lori
tbl_Zip_Code. This field should count the number of active vendors within a
zip code, local agency combination.
I got this to work on my subform (it counts all records regardless of zip
code and LA Nbr):
=DCount("[Vendor_Nbr]","qry_Zip_Code_Vendors","[Status_Code] = 'Active' and
[Peer_Group_Code] = 11")
I need to make it work within the current openings field to narrow the count
to each zip code, LA Nbr combination (which is what each record in the form
is based on) - how can I do this? Do I add to the criteria portion of the
function?
Sub_frm_vendor_zip_code is on my form and is based on a query called
qry_vendor_zip_code (run off of the tbl_vendor). This subform displays all
vendors for the zip code displayed on the form by linking the p_zip_code and
LA_Nbr fields in tbl_vendor to the zip_code and LA_Nbr fields in tbl_zip_code.
Thanks for any help - I know this is a lot of info - I was trying to provide
any help I could give. Lori