Re: Two Address Fields from Two Tables in a Query

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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]
.



Relevant Pages

  • RE: Two Address Fields from Two Tables in a Query
    ... >> I have a query with several tables. ... >> and Encounter History. ... So I want to either show one or the other address, depending on ...
    (microsoft.public.access.queries)
  • RE: Two Address Fields from Two Tables in a Query
    ... then you don't need to use the IIF to check if one of the fields is null, ... > I have a query with several tables. ... > and Encounter History. ... So I want to either show one or the other address, depending on ...
    (microsoft.public.access.queries)
  • Re: Different Address Fields in a Query
    ... >> I have a query with several tables. ... >> Encounter and Encounter History. ... >> What I want to do is show one Address field in my query, depending on ... > Dirk Goldgar, MS Access MVP ...
    (microsoft.public.access.forms)
  • RE: Two Address Fields from Two Tables in a Query
    ... Janet ... > I have a query with several tables. ... > and Encounter History. ... So I want to either show one or the other address, depending on ...
    (microsoft.public.access.queries)
  • Re: Different Address Fields in a Query
    ... > I have a query with several tables. ... > Encounter and Encounter History. ... There are Admit Date fields in each ... > What I want to do is show one Address field in my query, depending on ...
    (microsoft.public.access.forms)