Results 1 to 4 of 4
  1. #1
    Rhubie is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2012
    Posts
    85

    Concatenation

    I have this expressions in a query - if seems if some of he fields are blank it does not concatenate the other fields - how do I get them to concatenate if there are blank fields?



    ReportDesc: [KaratWeight]+" "+[Description]+" "+[Size]+" "+[TypeOfLeaf]+" "+[GramWeight]+" "+[Classification]

  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
    Hint: + propogates Nulls, & does not.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,630
    Use & character for concatenation. The + character is old concatenation operator left over from ancient BASIC that VBA evolved from. It is also addition operator and math operations involving null result in null so in spite of the text values in the expression, Access returns null. Any other math operation with alpha strings would error.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    Andycam is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2012
    Posts
    6
    Hi

    Try this:

    ReportDesc: [KaratWeight] & " " & [Description] & " - " & [Size] & " " & [TypeOfLeaf] & " " & [GramWeight] & " " & [Classification]

    Andycam

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

Similar Threads

  1. Extraneous character in Concatenation
    By bruegel in forum Queries
    Replies: 8
    Last Post: 07-23-2012, 10:14 AM
  2. Field concatenation
    By Trojnfn in forum Access
    Replies: 1
    Last Post: 10-10-2011, 05:56 PM
  3. Query and Concatenation
    By Try2Live4God in forum Programming
    Replies: 2
    Last Post: 05-25-2010, 03:45 PM
  4. Concatenation Urgent Help
    By Shoaib in forum Queries
    Replies: 0
    Last Post: 04-23-2009, 11:02 PM
  5. Concatenation, nested IIF functions
    By krymer in forum Queries
    Replies: 2
    Last Post: 10-20-2008, 07:27 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