Mailing List Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • razjafry
    New Member
    • Sep 2007
    • 30

    Mailing List Query

    Hi Experts,
    I have two tables - tblContact and tblOrg
    Contact table has only one option of mailing address e.g address,city,po stal code
    whereas Org table has two options - one simple address - address,city, postal code
    and other one is mailing address which is populated automatically if a check box is checked "Is mailing address same" - mailing address, mailing city, mailing Postal code
    I want to generate a mailing list that gets all the addresss of the Contact table and
    all the addresses from Org table but with mailing address populated as the first choice and if mailing address is empty then to use the simple address.
    I really appreciate any help.
    Regards,
    Raz
  • n8kindt
    New Member
    • Mar 2008
    • 221

    #2
    have u tried using the Nz() function? if you are populating the list using a query, a simple example would be this:

    MailingListAddr ess: Nz(MailingAddre ss, SimpleAddress)

    MailingAddress is selected unless it is Null... in which case, SimpleAddress would be selected

    Comment

    • razjafry
      New Member
      • Sep 2007
      • 30

      #3
      Thanks a lot n8kindt
      Nz() is a good one that I didn't know about.
      I got my problem solved partially though as two tables are related and any entry in the Org table that doesn't have a contact associated with it from Contact table is not shown in the result set.
      How I can have all the records from both table?
      I am using MS Access 2000 and tblOrg is master table in the relationship.
      Thanks for the help.
      Raz

      Comment

      • n8kindt
        New Member
        • Mar 2008
        • 221

        #4
        Originally posted by razjafry
        Thanks a lot n8kindt
        Nz() is a good one that I didn't know about.
        I got my problem solved partially though as two tables are related and any entry in the Org table that doesn't have a contact associated with it from Contact table is not shown in the result set.
        How I can have all the records from both table?
        I am using MS Access 2000 and tblOrg is master table in the relationship.
        Thanks for the help.
        Raz
        have u looked into union queries? i think that might be what u need.

        Comment

        Working...