I can create a similar effect, using two tables in my database. I'll explain the tables so you can see the relationship.
tblEmployees contains these columns:
EmployeeID
EmployeeFullname
etc
tblApplicationsUsed contains these columns:
RecordID
EmployeeID
SoftwareLicenceID
Stats1 ...............(I'll explain this later)
etc
I can use a query based on the 'EmployeeID' based relationship between these two tables, to list all software licences for one employee. If someone uses four applications, for example, the report might look like this - I have only shown the important bits, leaving out the report header etc.
Code:
Employee ID Header area
1234567 John Wilson
Detail
SoftwareLicenceID: Licence A
SoftwareLicenceID: Licence B
SoftwareLicenceID: Licence C
SoftwareLicenceID: Licence D
If I add a calculated text box called 'txtCounter' to the detail area, and include your formula
=Count(IIf(1=1,1)), the result is:
Code:
Employee ID Header area
1234567 John Wilson
Detail
SoftwareLicenceID: Licence A txtCounter: 4
SoftwareLicenceID: Licence B txtCounter: 4
SoftwareLicenceID: Licence C txtCounter: 4
SoftwareLicenceID: Licence D txtCounter: 4
If this is your reporting problem, try moving the calculated text box to the Group Header or footer. Make sure there is nothing in the Details section, and set its 'Visible' property to 'false'. When I do this in my example report, the result is:
Code:
Employee ID Header area
1234567 John Wilson txtCounter: 4
Detail
(now invisible)
An alternative way to do this type of counting, is to include a hidden column in your table (Mine is alled 'Stats1'. This is a byte field, which defaults to the value '1' when a new record is created, and is never changed.
You can list this in queries, and use functions to count and sum it where required.
Bob Stubbs