Results 1 to 7 of 7
  1. #1
    MaxQTime is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2019
    Location
    Kelowna, B.C.
    Posts
    42

    Combining Fields Into Single Text Box

    I have a database with names and addresses and I am having some trouble combining some into single text boxes on the report to make it look a little nicer. For example FisrtName and LastName or City and Province. I have set the text to =[FirstName] & " " & [LastName] and I'm getting a #Type! error when I run the report. Same thing for the City and Province.



    The First Name and Last Name I have on one of the forms combined into a single text box and it is working fine there. I have tried googling for the answer to this and can't seem to find anything either.

    Is this possible in reports?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    This expression works for me.

    Do your field names have spaces? You show them with and without space.

    Try doing concatenation calc in query and binding textbox to that field.
    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.

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,540
    In the reports underlying query create a calculated field with FullName:[NameOfFirstNameField] & " " & [NameOfLastNameField]

    Create a control in the report and set its Control Source property to FullName
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    MaxQTime is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2019
    Location
    Kelowna, B.C.
    Posts
    42
    Thanks, moving that to the query makes so much sense.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Your controls and fields don't have the same names by any chance?

  6. #6
    MaxQTime is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Apr 2019
    Location
    Kelowna, B.C.
    Posts
    42
    They probably do actually

  7. #7
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    In retrospect, it probably shouldn't matter in a case like this. June7 might have the right idea but you didn't comment on the question about name variations. Another guess is that the calculated textbox is on a sub report, or the referenced fields are. I suspect you've already discovered that putting the concatenation in the query solves it.

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

Similar Threads

  1. Report : Combining two Text Fields
    By gcbeldar in forum Reports
    Replies: 2
    Last Post: 08-17-2017, 09:13 AM
  2. Replies: 9
    Last Post: 03-28-2016, 03:57 PM
  3. Replies: 14
    Last Post: 07-22-2013, 12:39 PM
  4. Combining 3 update queries for a single table
    By Grahamiwa in forum Queries
    Replies: 1
    Last Post: 05-13-2011, 02:35 PM
  5. combining fields into a single list
    By rich in forum Queries
    Replies: 4
    Last Post: 02-23-2009, 06:41 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