I'm having problems finding a way to apply conditional formatting based on comparing the text contents of two fields in two different tables.
What I'd like to do:
I've got two tables that are identically structured with about 50 fields each. The two tables are used for two data inputters to independently enter the same data from the same source as part of a validation check. I want to be able to check which if any fields are different across the two tables for each. I have therefore created a report that has each field from the two tables adjacent to each other so that I can visually compare them. This would be much easier if I could highlight only the ones that are different.
Database details:
Windows 7, Access 2013
The two tables I'm comparing are [Data extraction - final reconciled] and [Data extraction - Tazeem]
These have a one-to-one join using their primary key - [EPPI ID]
I've created a query that selects all fields in both tables, joined on [EPPI ID].
I've then created a report based on this query (which if it makes a difference has two subreports in it).
What I've tried:
I've tried various ways of comparing the two fields using conditional formatting based on an Expression, e.g. for the field [Unit of allocation - details] I've tried the following individual expressions:
Expand|Select|Wrap|Line Numbers
- [Data extraction - final reconciled]![Unit of allocation - details]<>[Data extraction - tazeem]![Unit of allocation - details]
Expand|Select|Wrap|Line Numbers
- StrComp([Data extraction - final reconciled]![Unit of allocation - details],[Data extraction - tazeem]![Unit of allocation - details],1)<>0
Expand|Select|Wrap|Line Numbers
- [Data extraction - final reconciled]![Unit of allocation - details] In ([Data extraction - tazeem]![Unit of allocation - details])=0
Expand|Select|Wrap|Line Numbers
- InStr([Data extraction - final reconciled]![Unit of allocation - details],[Data extraction - tazeem]![Unit of allocation - details])=0
None of these work when I use them as a conditional formatting rule in the report, yet they all return the values I expect when I add them as alias fields to the query the report is based on.
Any ideas why?
Also, as there are about 50 odd fields that I need to compare and would rather avoid clicking on each to set the conditional formatting, is there some code that will do this automatically for all fields in the report?
Any advice really appreciated!
Thanks,
Fred