Filter Query Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table with duplicate Customer IDs but multiple address types. If I
want to select type MA or PR- but NOT BOTH, how do I write the query?
 
You can create a group by query order by customer and thet address type, and
in the Address type select First or Last, depend on which value you want
 
Yes, I am currently specifying MA or PR in the Criteria and am saying Last in
the Total line. The MA AND PR are selected (but if both are present, I only
want one). The problem is how do you limit the MA or PR if both are present.
Thanks for your response. mikep
 
If its a group by query, just select first or last instead of group by for
that field.
 
Well, I have the "Group by" selected for all fields, and have "Last" selected
in the Address Type field. Programatically I need to "save" a flag on the
first read of the results and check it the second time I read to then know if
the flag was set. That way I will not keep the second result which appears
as a dup. There may NOT be any way around it. BTW, in the query window I
right clicked and clicked on Properties then have been working with "Unique
Values" and Unique Records" without any luck. I'm close but no cigar.
Thanks! Mike
 
Back
Top