Iif statment in query



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


.



Relevant Pages

  • Re: Access to a custom table
    ... Create a collection based on this query for machines you want to include: ... "Tony" wrote: ... Let say I have computers named "A, B, C, D" in the database. ... > that has the NOT subselect query. ...
    (microsoft.public.sms.admin)
  • Re: This is odd!
    ... "Nikos Yannacopoulos" wrote in message ... > To verify, make a plain select query on the table, and use the following ... >> Tony Williams ...
    (microsoft.public.access.queries)
  • RE: Multi Selection List Box
    ... Dave Hargis, Microsoft Access MVP ... I guess it would help if Tony provided the SQL view of his query. ...
    (microsoft.public.access.queries)
  • RE: Multi Selection List Box
    ... Well, maybe, Duane, but the post starts off by mentioning a List Box from ... Dave Hargis, Microsoft Access MVP ... In addition, a text box value of "1,2,3" would not work in a query with SQL ... "Tony" wrote: ...
    (microsoft.public.access.queries)
  • Re: Selecting Fields
    ... I doubt Tony does either. ... >> I have a query that returns a variety of student psychometric data ... >> While it's easy enough to go into the query and select the fields to ... > I'd organize it in a different way, with a submask listing all the ...
    (microsoft.public.access.queries)