Hello
I've a table "Check" and a table "Company". In the table Check, there are some general checks listed that need to be done when a new company is added (ie: did we get approval to add the company; did we use form X; did we do a background check). In the future, there might be some other checkes as well. A background check has to be done every year. Therefor there's an expiry field as well.
Now I'd like to generate a list of all companies for which not all checks have been done.
I was thinking to check this as follows: create a form with all companies and for each company the checks that aren't expired.
Result is like this:
--------------------------------------------
| CompanyID + Check + ExpiryDate |
--------------------------------------------
| Company 1 + Check 1 + 01/01/2017 |
| Company 1 + Check 2 + 01/01/2017 |
| Company 1 + Check 3 + 01/01/2017 |
| Company 1 + Check 4 + 01/01/2017 |
| Company 2 + Check 1 + 01/01/2017 |
| Company 2 + Check 2 + 01/01/2017 |
| Company 3 + Check 1 + 01/01/2017 |
| Company 3 + Check 2 + 01/01/2017 |
--------------------------------------------
Now, I thought I'd count the unique values in table "Checks" using dcount and compare that for each Company the number of unique checks in the above form.
I have two questions:
I've a table "Check" and a table "Company". In the table Check, there are some general checks listed that need to be done when a new company is added (ie: did we get approval to add the company; did we use form X; did we do a background check). In the future, there might be some other checkes as well. A background check has to be done every year. Therefor there's an expiry field as well.
Now I'd like to generate a list of all companies for which not all checks have been done.
I was thinking to check this as follows: create a form with all companies and for each company the checks that aren't expired.
Result is like this:
--------------------------------------------
| CompanyID + Check + ExpiryDate |
--------------------------------------------
| Company 1 + Check 1 + 01/01/2017 |
| Company 1 + Check 2 + 01/01/2017 |
| Company 1 + Check 3 + 01/01/2017 |
| Company 1 + Check 4 + 01/01/2017 |
| Company 2 + Check 1 + 01/01/2017 |
| Company 2 + Check 2 + 01/01/2017 |
| Company 3 + Check 1 + 01/01/2017 |
| Company 3 + Check 2 + 01/01/2017 |
--------------------------------------------
Now, I thought I'd count the unique values in table "Checks" using dcount and compare that for each Company the number of unique checks in the above form.
I have two questions:
- I believe this might not be the most elegant solution. Do you have a better idea?
- How can I count the unique checks for each company?