Results 1 to 8 of 8
  1. #1
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126

    table field concatination

    concatination

  2. #2
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126
    I hI have an access19 Membership app. I try and create a concatinated string field by creating a calculated text field. What am I doing wrong?Attachment 48389
    Attachment 48391
    Attachment 48390

  3. #3
    Micron is online now Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Can't do that and nor should you, so that's what you're doing wrong. This is also a form of data duplication as you have the other parts of the info in separate fields. Use form/reports/queries to concatenate such data and only for display purposes.

    EDIT - wondering what NameExt is as I see that is calculated as well.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    check your formula - you have a * and not a &

    Not sure why you want it as long text - be very surprised if you would exceed 255 characters.

  5. #5
    davegri's Avatar
    davegri is online now Excess Access
    Windows 11 Access 2019
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,389
    Don't use calculated field in table. Do it in a query and use the query instead of the table as recordsource for forms, reports, etc.

    Click image for larger version. 

Name:	qd.png 
Views:	37 
Size:	49.3 KB 
ID:	48394


    Click image for larger version. 

Name:	qr.png 
Views:	37 
Size:	30.4 KB 
ID:	48395

    Notice now that I forgot suffix.

    Code:
    FullName: Trim([Prefix] & " " & [LastName] & ", " & [FirstName] & " "+[m_nAME] & ", "+[suffix] & IIf(([NameNick] & ""=""),""," " & Chr(34) & [NameNick] & Chr(34)))
    Last edited by davegri; 07-30-2022 at 11:56 AM. Reason: added suffix note

  6. #6
    Synergy.ron@gmail.com is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2020
    Location
    washington
    Posts
    126
    It just seemed weird that access a)would let me construct the formyla and NOT throw an err msg when run??????

  7. #7
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    it is throwing an error message - #Error

    The syntax is presumably OK, (you can multiply in a formula) otherwise it would not let you save the formula - but then errors when you try to multiply by a text value

    you will get the same issue when trying to multiple two fields and one of them is null or dividing where the devisor is 0. Formula is OK, the problem is with the data

  8. #8
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,001
    I'd be amazed if you can base a calculated field of another calculated field (Which you appear to be doing with NameMI in the example above)

    I have no objection to using a calculation in this type of scenario, I frequently have a FullName calculated field in employee/staff tables.
    It's only used for lookups so performance is not really an issue, and it can be persisted in SQL server so can be indexed if required.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. Replies: 7
    Last Post: 11-08-2021, 10:01 AM
  2. concatination with cdate
    By Jen0dorf in forum Access
    Replies: 8
    Last Post: 04-20-2016, 03:27 PM
  3. concatination issue
    By Jen0dorf in forum Access
    Replies: 6
    Last Post: 04-05-2016, 06:08 AM
  4. writing a concatination field
    By Jen0dorf in forum Access
    Replies: 5
    Last Post: 03-30-2016, 10:48 AM
  5. Replies: 5
    Last Post: 11-01-2012, 09:26 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