bauer
08-24-2001, 07:08 AM
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
shacket
08-24-2001, 08:20 AM
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.
bauer
08-24-2001, 08:24 AM
to clarify, prefferedAddress is a yes no, and if it's yes, the associated address should be kept, otherwise it should be deleted.
Thanks
Pat Hartman
08-24-2001, 01:54 PM
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.