Results 1 to 4 of 4
  1. #1
    fajardok is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    4

    Mail to a PO Box when available, default to physical when not.

    OK, the title stinks I know... I have a database with addresses. For the majority of the individuals, the address is also their mailing address.. but for some, there is an additional field if they have a differnt PO BOX.

    Is there a way to run a report and/or query that if the 'PO/BOX' field is blank or Null it defaults to the "Physical" address, but if there is information in the PO/BOX field, It would print that on the Mailing Report?

    Thinking it might be easier to just export into Excel and Sort... any thougths?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Shouldn't be too difficult. If the PO Box field would be Null, this type of thing would work:

    Nz(POBoxFieldName, OtherFieldName)
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    fajardok is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    4
    Thanks... where do i put the code?

    Quote Originally Posted by pbaldy View Post
    Shouldn't be too difficult. If the PO Box field would be Null, this type of thing would work:

    Nz(POBoxFieldName, OtherFieldName)

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    Wherever you want the substitution made. Typically in a query or on a form or report, but it can work anywhere.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Mail Merge
    By DCV0204 in forum Forms
    Replies: 6
    Last Post: 12-13-2011, 09:32 AM
  2. Leveraging SendObject and default local mail client
    By chris.williams in forum Programming
    Replies: 0
    Last Post: 12-08-2011, 04:42 PM
  3. Replies: 11
    Last Post: 09-12-2011, 11:30 AM
  4. Form Field open Default mail client
    By ducecoop in forum Access
    Replies: 4
    Last Post: 11-18-2010, 11:37 AM
  5. Access mail
    By Trick in forum Access
    Replies: 3
    Last Post: 11-06-2010, 04:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums