Results 1 to 4 of 4
  1. #1
    Jamescdawson is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2012
    Location
    South Wales, UK
    Posts
    98

    Missing data when adding contents of two fields

    I've created a text box which adds the contents of three other text fields =[Address1]+", "+[Address2]+", "+[City]. My problem is that if Address2 is empty, the new combined field doesn't display any of the other elements. I get a blank Address line.

    Any suggestions ?

    Best Regards

    Jimbo

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try:
    =[Address1] & ", " & [Address2]+", " & [City].

    I left 1 "+" on purpose. A "+" will propigate a Null and the "&" will not.

  3. #3
    Jamescdawson is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jan 2012
    Location
    South Wales, UK
    Posts
    98

    Thumbs up

    RuralGuy.Many Thanks. Works fine... There are just so-o-o-o-o many of these little switches and you just don't know where to look for referencing them.

    Thanks again


    Quote Originally Posted by RuralGuy View Post
    Try:
    =[Address1] & ", " & [Address2]+", " & [City].

    I left 1 "+" on purpose. A "+" will propigate a Null and the "&" will not.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Glad we could help.

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

Similar Threads

  1. Match data with different contents
    By jeroen4691 in forum Queries
    Replies: 5
    Last Post: 03-01-2012, 03:16 AM
  2. Replies: 3
    Last Post: 12-19-2011, 11:18 AM
  3. Missing Fields Within a Report
    By genest11 in forum Reports
    Replies: 1
    Last Post: 10-05-2011, 11:13 AM
  4. Replies: 2
    Last Post: 02-25-2011, 03:56 PM
  5. Fields and their contents
    By Ham in forum Access
    Replies: 0
    Last Post: 02-06-2009, 07:34 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