Checking if data has been entered

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am creating a mail merge document from a database. My table currently includes
First Name, Last Name, Title, Institution, Address(work) City(work), Postcode(work), Address(home), City(home), Postcode(home).

I would like to create a query in the database which shows the home address for each person, but if there is no home address I want the work address to show up. I'm not entirely skilled at coding so I don't know how to do this. Also some people are duplicated so I would only like unique records without deleting people who happen to share the same surname or work at the same institution.

Any help would be gratefully appreciated.

Thanks in advance.
 
Clare

For the first point (home address, else work address), use the IIF()
function to "decide", within a select query, whether to display home or work
address. Check Access HELP on the syntax.

For the second ("only...unique records"), you can set your query's
UniqueValues property to Yes to see only one copy of each unique combination
of fields selected. This won't affect your underlying data.
 
Back
Top