In access 2003...
Is there a way to format a text box in a continuous form depending on whether or not the value in the field is duplicated?
I've tried using the DCount function on the "OnCurrent" Event of the form:
If DCount("[FIELD]", "QUERY_NAME", "[FIELD] = Forms!form_name![FIELD]") > 1 THEN Me.[FIELD].ForeColor = vbRed
And I tried adding another field to the form containing the count and using that as the criteria - but then it formats for every record and not just the ones with duplicate values.
Help?
Why the hell couldn't Microsoft just include an "IN" operator in the conditional formatting tool? Does anyone know if this has changed in Access 2007?
Is there a way to format a text box in a continuous form depending on whether or not the value in the field is duplicated?
I've tried using the DCount function on the "OnCurrent" Event of the form:
If DCount("[FIELD]", "QUERY_NAME", "[FIELD] = Forms!form_name![FIELD]") > 1 THEN Me.[FIELD].ForeColor = vbRed
And I tried adding another field to the form containing the count and using that as the criteria - but then it formats for every record and not just the ones with duplicate values.
Help?
Why the hell couldn't Microsoft just include an "IN" operator in the conditional formatting tool? Does anyone know if this has changed in Access 2007?
Last edited: