We do checks for errors on customer's shipments and run a reporting registry on errors found.
Each check may result in one or more errors identified. It may also result in no errors identified.
I have an access table that contains information about each check done. In the table, there is a column "Errorsfound" that keeps information about whether each particular revealed an error, if there were more than one error, and the nature of the error.
In the column "Errorsfound", the user may choose to check one or more values:
-No errors found
-Error A
-Error B
-Error C
(Of course, logically it will make no sense for the user to check both the value "No errors found" and the value "Error A", while it would make sense to check "Error A" together with "Error B" since both can be present at the same time. However, I do not want to leave "No errors found" out, since I would then have no way to see if the user has chosen to report no errors or the user has forgotten to report.)
Now;
For ease of reporting, I would like a column that reveals whether the particular record has any errors. Let's call this column "Any_errors_found". I would like the column to display the value "1" if "Errorsfound" has one or more of the values that signifies that errors were found. I do not want the value "1" to appear if "Errorsfound" has the value that signifies that no errors were found.
I have tried making an updating query that inserts the value "1" into a column if the column "Errorsfound" contains either "Error A", "Error B" or "Error C". This works, but it quickly becomes impractical as I have to run that updating query regularly. I can do it with a macro, but it is still impractical.
I would like instead for a calculated field to show if any errors were found. I tried to do this using an "IIf" expression. However, cannot seem to make a calculated field that is based on whether the column "Errorsfound" has a particular value.
Why is this, and what do I do instead?
I have made an image of how this would ideally look: