Still making headway, however the DCount function is giving me the total of each set of filtered records in the entire table. I am not able to get a sub-total for each group I have in the report.
Probably I should try to explain:
This database is used by a catering service that provides meals to patients at three hospitals. There are 11 different types of diets.
The database will have to count how many of each diet for each hospital by wards. This will have to be done for Breakfast, Lunch and supper each day.
So I have created a combo box in a sub-form, on the main form. The list of the 11 diets are in a separate table exclusively, and is referenced by the combobox. Whenever any one of the 11 diets is selected that instance/value is stored in one field. In other words all the different values for each record created are stored in one field.
The challenge was to group all the diets together (from the field they are all stored in) based on their names. And then have them grouped by hospital, then by wards and also by the different meal times (Breakfast, Lunch & Supper).
I have been able to do all this already. However, the DCount is not referencing the Query that the Report is based on but the Table that has the combo box values. So even though the Table is in the database relationship, the DCount fn seems to be accessing the table before it is related in the query from which the report feeds.
Because of this, I am not able to group the sub-totals by Hospital, Wards etc.