>Hi again Nadya,
>
>Looks great. What I have to do in my program is charge a fee for every person that
>has two insurance policy company "a" and Company "B". The personal ID = ssnumber,
>the insurance company names Company "a" and company "b" are the other factors. whenever my
>search comes up with a insurance company policy that has the same ID ssnumber .and. insurance company "a"
>and Insurance company "b" present in the record,
>I want to update that record.field("both") with a "B". Later I can / that number by 2 and * by a fee.
>any help ?
>Thanks John
John,
I'm still confusing. Could you please give me the structure of the table, you want to update?
Now I'm just guessing:
Suppose you have a table with this structure:
ssnumber - I
Insurance - C 25
Mark C 1 (where you want to put B for companies, which have the same ssnumber but 2 different insurance name).
Ok, your steps would be:
1) Run query I suggested to identify possible candidates (2 or more insurance companies for the same ssnumber). If you can have 2 identical records (i.e. same ssnumber and same company name (though it would be strange) - add group by name in addition to group by ssnumber).
2) Index this query by ssnumber
3) Set relation from your table into the Dupes table
4) select yourtable
replace Mark with 'B' for found('Dupes') in YourTable
HTH
If it's not broken, fix it until it is.
My Blog