You are getting kind of a "mini-Cartesian product" for the duplicate rows. That is, each row of a set having the same ID, EFFECTIVE, and CARRIER_ID in qryReconcileTMSRates is being matched with each row of qrymanuMasterRates having matching LANE_ID, EFFECTIVE, and CARRIER_ID values. It's effectively an inner join on a many-to-many relationship.
I take it that you want each row from qryReconcileTMSRates, but you want it matched with only one row from qrymanuMasterRates.
Open qrymanuMasterRates and look at sets of rows that have the same LANE_ID, EFFECTIVE, and CARRIER_ID values. You want to pull VARIABLE_RATE and FIXED_CHARGE from that set of rows. Will VARIABLE_RATE and FIXED_CHARGE always have the same values for the rows in each set?
If so, you can solve your problem this way:
1. Create a GROUP BY query based on qrymanuMasterRates.
2. Group by the three fields you use to join with qryReconcileTMSRates.
3. Select the First() value for each of VARIABLE_RATE and FIXED_CHARGE.
4. Save the query. Then substitute this query for qrymanuMasterRates in your original query.
(BTW, if VARIABLE_RATE and FIXED_CHARGE always have the same values, it suggests either that one of the underlying tables isn't normalized, or that qrymanuMasterRates is itself a join that includes some table you don't need in the present case. If the latter, it would be more efficient to eliminate the duplicates by creating a similar query that omits the unneeded table(s).)
If VARIABLE_RATE and FIXED_CHARGE do not always have the same values, what you're asking for doesn't make sense, because you haven't given us any criterion for choosing one value over another. If you don't really care which row you use in the join, you can use the method above. If you do care, you need to expand your inner join to incorporate that criterion.
Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein