SeadnaS
Programmer
- May 30, 2011
- 214
I'm not sure if this is the right place for this question. I have a query that shows if the word fail is in a list of certain records:
SELECT CHILD.MODEL_NO, CHILD.TEST_TYPE, CHILD.LOT_NO, CHILD.PASS_FAIL AS fail
FROM CHILD
GROUP BY CHILD.MODEL_NO, CHILD.TEST_TYPE, CHILD.LOT_NO, CHILD.PASS_FAIL
HAVING (((CHILD.MODEL_NO) Like [forms]![NEW_MASTER_FORM]![MODEL_NO]) AND ((CHILD.TEST_TYPE) Like "PROX_TENSILE") AND ((CHILD.LOT_NO) Like [forms]![NEW_MASTER_FORM]![LOT_NO]) AND ((CHILD.PASS_FAIL) Like "fail"));
This shows the word FAIL in the fail column if fail is in the selected records if otherwise the query runs blank.
I want a text box on my form that runs that query and shows FAIL if the query shows FAIL and PASS if the query doesn't. I figure i need to do this in VBA. There's probably a much easier way to do this than what I'm trying but I can't quite figure it out.
SELECT CHILD.MODEL_NO, CHILD.TEST_TYPE, CHILD.LOT_NO, CHILD.PASS_FAIL AS fail
FROM CHILD
GROUP BY CHILD.MODEL_NO, CHILD.TEST_TYPE, CHILD.LOT_NO, CHILD.PASS_FAIL
HAVING (((CHILD.MODEL_NO) Like [forms]![NEW_MASTER_FORM]![MODEL_NO]) AND ((CHILD.TEST_TYPE) Like "PROX_TENSILE") AND ((CHILD.LOT_NO) Like [forms]![NEW_MASTER_FORM]![LOT_NO]) AND ((CHILD.PASS_FAIL) Like "fail"));
This shows the word FAIL in the fail column if fail is in the selected records if otherwise the query runs blank.
I want a text box on my form that runs that query and shows FAIL if the query shows FAIL and PASS if the query doesn't. I figure i need to do this in VBA. There's probably a much easier way to do this than what I'm trying but I can't quite figure it out.