This is going to sound weird, but I'm hoping this is possible.
There are two tables involved in my question. Tbl_1 contains an amount of 'raw material' to be used. Tbl_2 contains multiple steps wherein the raw material is mixed in batches. So let's say Magnesium Oxide (raw material) has an amount of 1000kg from tbl_1. There will be a few steps on tbl_2 where that ingredient is mixed in (step 1: 500kg, step 2: 0, step 3:500kg). I want to know if there is a way to check and balance the numbers. If I place 501kg in step 1 and 500kg in step 3, I now have 1001kg. I'd like an error message saying that I've exceeded the allowable limit for that raw material.
Is this possible? If so, how?
I was thinking of writing 2 strSQL in VBA: 1 to call the total of entries on tbl_2 and 1 to call the reference field from tbl_1. Then I'd do an IF > statement to present the error message. Am I on the right track?