concatination
concatination
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
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.
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.
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.
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
It just seemed weird that access a)would let me construct the formyla and NOT throw an err msg when run??????
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
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 ↓↓