TheWedgie
Registered User.
- Local time
- Today, 15:22
- Joined
- Mar 15, 2009
- Messages
- 19
I have taken over a database for a mobile medical centre, and need to add a report summarising each event they attend.
- Each event has its own table (easy enough to set the recordsource on loading the report).
- Each patient record in that table has a "PrimaryCondition" and "SecondaryCondition".
- PrimaryCondition and SecondaryCondition are each taken from another two tables called the same, where each PrimaryCondition has a few SecondaryConditions.
- The SecondaryCondition table has two fields: "PrimaryCondition" and "SecondaryCondition", where PrimaryCondition refers back to the PrimaryCondition table and it's data.
What I need to do is list a count of all the SecondaryCondition's (Grouped by PrimaryCondition) for an event - however as there is the possibility that conditions will be added/removed in the future, I can't just manually type labels and do a heap of DCount's.
Any ideas as to how I can dynamically list all of the Condition's and a count?
I assume it would have to be done in a Query, which I'll be playing with in the next few days when I get time, but figured I'd ask here in case someone has done something similar.
Cheers,
Nick
- Each event has its own table (easy enough to set the recordsource on loading the report).
- Each patient record in that table has a "PrimaryCondition" and "SecondaryCondition".
- PrimaryCondition and SecondaryCondition are each taken from another two tables called the same, where each PrimaryCondition has a few SecondaryConditions.
- The SecondaryCondition table has two fields: "PrimaryCondition" and "SecondaryCondition", where PrimaryCondition refers back to the PrimaryCondition table and it's data.
What I need to do is list a count of all the SecondaryCondition's (Grouped by PrimaryCondition) for an event - however as there is the possibility that conditions will be added/removed in the future, I can't just manually type labels and do a heap of DCount's.
Any ideas as to how I can dynamically list all of the Condition's and a count?
I assume it would have to be done in a Query, which I'll be playing with in the next few days when I get time, but figured I'd ask here in case someone has done something similar.
Cheers,
Nick