You should store discrete pieces of data by itself. That means you should use 2 fields for the AFter data.
You need to get all valid Item/WorkArea permutations into a record together.
WorkAreaItems
WorkArea, Item
5th Floor Med Surg, ACLS
6th Floor Med Surg, ACLS
5th Floor Med Surg, BLS
WHERE (((tblUnits.Unit)="6th Floor Med Surg") AND ((tblJunction.Item)="ACLS")) OR (((tblJunction.Item)="BLS"));
You will no longer have a WHERE clause in your query for Unit/Item permutations.
You will have a datasource that has all the ones you want to report on. This is why you need a query that gets all the permutations together so you can use it.
So instead of this:
Code:WHERE (((tblUnits.Unit)="6th Floor Med Surg") AND ((tblJunction.Item)="ACLS")) OR (((tblJunction.Item)="BLS"));
You would need a datasource like so:
ReportUnit, ReportItem
6th Floor Med Surg, ACLS
6th Floor Med Surg, BLS
Let's call that datasource 'ReportingUnitItems. Then, instead of the WHERE you would have another INNER JOIN from your existing datasources to ReportingUnitItems.
Yes please. Actually if you could upload now--I just need the source data.
Yes please. Actually if you could upload now--I just need the source data.
You don't have a table that lists all Item/Unit permutations you want to report on. You still have the improperly structured tblItems. It should have 2 fields in it, not 1 which holds the data of 2 fields.
Then remove the primary key. If you feel you need one add an autonumber and make that the primarky key. Or make it a composite key using both fields.
So are you good then?
Is your data set up to determine that? I mean, do you have a datasource of items and their schedules?
Also, what do you expect in terms of results? Do you want a query that list each item with the next date something is due? Or do you want a list of everything due in the next 5 years?
It gets more complicated because the same item from WorkAreaA may be due every year, but in WorkAreaB, it may be due every two years
You don't need seperate tables for this, you just need to store it in the proper place. From the above sentence, that proper place is in the table we worked on with Unit/Item.
Also, for this new field you need to use the lowest common unit of length of time something can be due. If the most frequent thing is tested every other month, then every item must have their frequency expressed in months.