Re: Two Address Fields from Two Tables in a Query
- From: Marshall Barton <marshbarton@xxxxxxxxxx>
- Date: Mon, 15 Aug 2005 19:16:44 -0500
JanetF wrote:
>I have a query with several tables. Two of the tables are called Encounter
>and Encounter History. There are Admit Date fields in each of these tables,
>but they are always different. Each table also has an Address field
>(Encounter.Address and EncounterHistory.Address). What I want to do is show
>one Address field in my query, depending on which table's Address field is
>not null. There will never be an address filled in for both table's Address
>fields. So I want to either show one or the other address, depending on
>which field is not null, in a new field called "Address" in my query.
As a side note to Ofer's solution. If there might be
addresses in both tables and you only wnat the history
address when the address in the encounter table is null, you
can do this:
Nz((Encounter.Address, EncounterHistory.Address)
--
Marsh
MVP [MS Access]
.
- References:
- Two Address Fields from Two Tables in a Query
- From: JanetF
- Two Address Fields from Two Tables in a Query
- Prev by Date: Re: AutoLookup Query doesn't autofill my fields
- Next by Date: Re: More query questions re: keywords
- Previous by thread: RE: Two Address Fields from Two Tables in a Query
- Next by thread: How to make two columns from one where first name and last name is separated by comma?
- Index(es):
Relevant Pages
|