A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query for two fields in one record that do not match



 
 
Thread Tools Display Modes
  #1  
Old June 30th, 2008, 04:44 PM posted to microsoft.public.access.queries
Linda Lou
external usenet poster
 
Posts: 2
Default Query for two fields in one record that do not match

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.
  #2  
Old June 30th, 2008, 04:51 PM posted to microsoft.public.access.queries
[email protected]
external usenet poster
 
Posts: 25
Default Query for two fields in one record that do not match

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




  #3  
Old June 30th, 2008, 05:14 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Query for two fields in one record that do not match

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

Linda Lou wrote:
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.

  #4  
Old June 30th, 2008, 06:06 PM posted to microsoft.public.access.queries
Linda Lou[_2_]
external usenet poster
 
Posts: 2
Default Query for two fields in one record that do not match

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

" wrote:

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





 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:01 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.