Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601

    Unanswered: Concatenate Components

    I am trying to get my reports looking a bit nicer. I read that I can do
    Code:
    =[FirstName] & " " & Iif([MiddleName], [MiddleName] & " ","") & [LastName] & " " & [Suffix]
    I took the Iif statment out also [suffix] and i get "#Error?". So I tried the long way..
    Code:
    =Employees!FirstName & " " & Employees!LastName
    Now I get "#name?" what's going on?
    Ryan
    My Blog

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    what's the name of the textbox you're trying to put this in?
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jun 2004
    Location
    Seattle, WA
    Posts
    601
    The textbox name is LastName
    Ryan
    My Blog

  4. #4
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Smile

    Here you go...let's say you have these field names:

    FirstName, MiddleName, LastName

    to contatenate (combine them) do this:

    FullName:[FirstName]&" "&[MiddleName]&" "&[LastName]

    That's all there is to it. You can do that in the Query as well as creating a field in the Form.
    Also, if you want either Comma's or Dashes in between, just place them between the double quotes as such:

    [FirstName]&"-"&[LastName]

    have a nice one,
    Bud

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •