Results 1 to 8 of 8
  1. #1
    Glider_man is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    4

    generating mailing label reports


    I’m an Access newbee and here’s my question. I have created a simple database of people names and addresses. Some of the people are married. Suppose I wish to generate mailing label report and insert the word “and” separating the first names of him and her but didn’t want the word “and “ inserted for single people. How do I do that?

  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,521
    What does the data look like (table structure)?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Glider_man is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    4

    Table structure

    ID, Last Name, first name, spouse name, address…
    Is this what you mean?

  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,521
    This type of thing should work. It takes advantage of the fact that "+" propagates Null and "&" does not:

    =[FirstName] & (" and " + [SpouseName]) & " " & [LastName]
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Glider_man is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    4
    Forgive me for asking but where do I insert the code =[FirstName] & (" and " + [SpouseName]) & " " & [LastName] ?

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    That was an example of a textbox control source. The technique could also be used in a query or in code.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Glider_man is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2011
    Posts
    4

    Smile Thank you

    That worked, thank you.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help, and welcome to the site by the way!
    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. Generating split reports
    By daddylongtoe in forum Reports
    Replies: 1
    Last Post: 12-02-2010, 05:39 PM
  2. access mailing label message
    By fwit in forum Access
    Replies: 1
    Last Post: 07-14-2010, 01:36 PM
  3. Replies: 0
    Last Post: 05-14-2010, 07:28 AM
  4. Generating reports by incomplete field
    By mathonix in forum Reports
    Replies: 2
    Last Post: 01-28-2010, 06:37 PM
  5. Printing multiple copies of a mailing label
    By Flight Planner in forum Reports
    Replies: 1
    Last Post: 10-19-2006, 08:16 AM

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