Not sure if this is for the query area or not...but here is my issue:
Simply put, I need to compare numbers from 2 different rows. If one number is less than a set value, then a flag should go up, same with the number from the 2nd row...if it is less than a specified value, then the flag is raised.
I have a lookup table containing the set values:
My table that assigns this to a person is:
So I'm trying to find out if person 1234 got less than 100 in area 1 or less than 200 in area 2 than the flag is raised.
This would be easier, maybe, if the data was on 1 row. Which i cannot because there will be a related child table to this one.
If it needs to be done other than a query, like VBA or something, I can post it there. I'm up for any help trying to figure this out.
Thanks!
Simply put, I need to compare numbers from 2 different rows. If one number is less than a set value, then a flag should go up, same with the number from the 2nd row...if it is less than a specified value, then the flag is raised.
I have a lookup table containing the set values:
Code:
Area Min Max Level
===========================
1 0 100 A
1 101 200 B
1 201 300 C
2 0 100 A
2 101 200 B
2 201 300 C
My table that assigns this to a person is:
Code:
ID PersonID Area Score
==========================
1 1234 1 89
2 1234 2 255
3 5890 1 210
4 5890 2 120
So I'm trying to find out if person 1234 got less than 100 in area 1 or less than 200 in area 2 than the flag is raised.
This would be easier, maybe, if the data was on 1 row. Which i cannot because there will be a related child table to this one.
If it needs to be done other than a query, like VBA or something, I can post it there. I'm up for any help trying to figure this out.
Thanks!