D
Damien McBain
I'm trying to use the Dcount function in the Control Source of a text box on
a report.
The database has 4 tables which are all linked:
Customers
ProductHierarchy
Sales
Territories
Like this:
Territories Customers Sales ProductHierarchy
----------- --------- ----- ----------------
AccNo 1--> AccNo
CustName PH2 <----1 PH2
Class ActTonnes Description
Terr 1-----> Terr ActSale
Description Status etc etc
SOff
In the Customers table the "Status" is either "Not Started", "In Progress"
or "Complete".
The record source for the report is a query called "ReportQuery" (original
hey?). It contains all of the fields in the 4 tables.
The report has 2 grouping levels, Territory and PH2 (it's a summary report).
I'm trying to create a text box in the Terr group header that will return
the number of Customers assigned to the "current" Territory (that is, the
Territory which is displayed in the Terr group header) have the value
"Complete" in the Status field.
I'm stumped though. I'm trying:
=DCount("[Status]","Customers",[Terr]=[Reports]![Terr-Hier]!Terr And
[Status]="Complete")
Sorry about the verbose explanation. Any help very much appreciated, I don't
know what I'm doing on this dcount thing.
Damien
a report.
The database has 4 tables which are all linked:
Customers
ProductHierarchy
Sales
Territories
Like this:
Territories Customers Sales ProductHierarchy
----------- --------- ----- ----------------
AccNo 1--> AccNo
CustName PH2 <----1 PH2
Class ActTonnes Description
Terr 1-----> Terr ActSale
Description Status etc etc
SOff
In the Customers table the "Status" is either "Not Started", "In Progress"
or "Complete".
The record source for the report is a query called "ReportQuery" (original
hey?). It contains all of the fields in the 4 tables.
The report has 2 grouping levels, Territory and PH2 (it's a summary report).
I'm trying to create a text box in the Terr group header that will return
the number of Customers assigned to the "current" Territory (that is, the
Territory which is displayed in the Terr group header) have the value
"Complete" in the Status field.
I'm stumped though. I'm trying:
=DCount("[Status]","Customers",[Terr]=[Reports]![Terr-Hier]!Terr And
[Status]="Complete")
Sorry about the verbose explanation. Any help very much appreciated, I don't
know what I'm doing on this dcount thing.
Damien