"The buyprice has duplicate records for some part numbers"
"I need to get rid of the duplicates in the buyprice table"
That is a probably database maintenance issue then.
Or do you mean the table has multiple records for some part numbers?
Duplicate records are bad in databases, as they indicate a violation of one of basic principles of databases. With most databases, this triggers an error.
If Select Distinct is not a solution for you (and assuming you have v8) then a running total can also fix you up - you can have the running total triggered on change of part number, so that it only gets fired once per part number.
If you have v7 or less, you are probably best to use the 3 formula approach to running totals (see FAQ on running totals). Malcolm
wynden@telus.net