Query for two fields in one record that do not match

L

Linda Lou

I am trying to create a query that will show me all of the records in a table
where two fields in the record do not match, basically the opposite of a find
duplicates query, however the find unmatched query will not work for me. I
have a table listing a client ID, an activity code, a count of the units and
total units. Due to a report glitch in our software, the count of the units
and the total units are not always equal and I need to find those records so
we can figure out what the problem is in our report. I would appreciate any
suggestions. The client number is unique, but each client has several
activity codes so I do not have a field that is entirely unique the same
activity codes are used for several clients.
 
A

adam.vogg

say your fields are units_total and units_count. in the query just
make the criteria under units_total set to: <>[units_count]
 
J

John Spencer

Your need is unclear.

If the record has CountUnits and TotalCountUnits and you want to see if the
two numbers are not equal then all you need to do is use one as the criteria
of the other.

Field: CountUnits
Criteria: <> TotalCountUnits

Perhaps, you could include a few sample records (just the necessary fields)
and tell us which records you would want returned.


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
L

Linda Lou

Thank you very much, this worked perfectly, I had a feeling I was making it a
lot more complicated than it needed to be!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top