Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using streetaddress or PO box 1

Status
Not open for further replies.

imppatient

Technical User
Feb 24, 2005
2
NL
Hello,

This seems like a simple problem but I can't find the solution.
I have a database with projectrelations, most of them have a PO box.
When there is no PO box there is a street address.

The problem is that I want to have a query in which it displays the PO box (if available or else the street address) in a field called MAIL.
I have been working with two separate queries (one for the PO box and one for the street address), but it would be much handier to work with one query only.

Thanks in advance.
 
In the query grid.
MAIL: Nz([PO box],[street address])

If Po box may be empty or blank instead of null:
MAIL: IIf(Trim([PO box] & "")="",[street address],[PO box])

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks alot, it worked it was the IIf command that I had to use. But instead of the comma's "," I had to use ";"

Maybe because of Access 2000? Anyway thanks alot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top