getting rid of repeptative records

bauer

Registered User.
Local time
Today, 10:54
Joined
Aug 23, 2001
Messages
77
I have a query that has addresses, there is a field called preffered address, which if they have 2 addresses, this is clicked for that address.

My problem:
I want to only show all of the addresses, and if one person has two, only the preffered address

thank you
 
Use an IIf statement:

FinalAddress: IIf(Nz([PreferredAddress]) = "",[RegularAddress],[PrefferedAddress])

This would create a field named FinalAddress which, if nothing was in the preferred address, would be populated with the regular address.
 
to clarify, prefferedAddress is a yes no, and if it's yes, the associated address should be kept, otherwise it should be deleted.
Thanks
 
If the addresses are in separate rows, add selection criteria to the query to only select the preferred address record. In the QBE grid, put yes (no quotes) in the criteria line of the preferred address flag.
 

Users who are viewing this thread

Back
Top Bottom