Iif statment in query
- From: "Tony Williams" <tw@xxxxxxxxxxx>
- Date: Wed, 31 May 2006 14:06:46 +0100
I want to create a query to be used in a mail merge with Word. I have a
table that has a fields for company name, contact's title,contact's initial
and contacts last name. There is always a contact name but not always a
company name. So when I'm building the address for a letter from the query I
want it to be something along these lines
1st line....................contact's title,contact's initial and contacts
last name
2nd line...................If the company name is blank, leave blank, but if
the company name is there show company name ( I don't want a blank line to
appear in the address
3rd Line................. address etc etc
I'm assuming I could use an IF statement in the query along the lines of
this
IIf (company is Null, isNull, company)
Am I right and where would I put the if statement
Thanks
Tony
.
- Follow-Ups:
- Re: Iif statment in query
- From: John Spencer
- Re: Iif statment in query
- Prev by Date: RE: Why do Access queries stop working if I use more than 2 criter
- Next by Date: Re: SQL: Joining 3 tables!
- Previous by thread: RE: Why do Access queries stop working if I use more than 2 criter
- Next by thread: Re: Iif statment in query
- Index(es):
Relevant Pages
|
|