Thread: data query
View Single Post
  #5  
Old March 28th, 2007, 04:54 PM posted to microsoft.public.access.queries
fishtofly
external usenet poster
 
Posts: 3
Default data query

Thanks John,

It worked. This is going to help a lot.

Cheers!

"John W. Vinson" wrote:

On Tue, 27 Mar 2007 19:02:06 -0700, fishtofly
wrote:

I tried using the query wizard to create an unmatch record query but it did
not work. For the field of tag_id in my2003, I used the query wizard and
wrote"[my2003]![tag_id][monitor2003]![tag_id]". It came up with all the
records in the table of my2003. I need the unique tag_id's that are in
my2003 and not in monitor2003.


Then you didn't use the Unmatched Query wizard - that's not what it does!

Each record in [my2003] is, in fact, unequal to *some* record in [monitor2003]
- in fact, it's probably unequal to all or all but one of them.

To roll your own query, follow these steps:

1. Create a new Query adding both tables, joined by tag_id. (This finds just
what you DON'T want, the records which do match. But watch...)
2. Select the Join line and view its properties; select option 2 (or maybe 3)
- "Show all records in my2003 and matching records in monitor2003". (This is
even worse, it shows everything in my2003, matched or not. Patience...!)
3. Select ONLY the tag_id field from Monitor2003 into the grid, along with all
the fields you want to see from My2003. Put a criterion of

IS NULL

under Monitor2003.tag_id.

Open the query and you'll see just those records which DON'T match.

John W. Vinson [MVP]