I have a report listing certain information. Because that report is then exported to Excel format for distribution, the name field is concatenated, Last name, first name, preferred name on a new line.
Looks something like this:
=[LastNM]&", "&[FirstNM]& Chr(13)& Chr(10)&[PreferredName]
Which gives a nice little:
Doe, Jonathan
Jon
kind of display.
Now, I wanted to put the preferred name in quotation marks, obviously, Access doesn't like quotation marks, so I can't use those. When I reassessed my expectations, I decided to go into the preferred name field and add single quote marks around the preferred name, which yielded the proper results in the form, which all exported nicely into Excel.
The problem is, that I did not realize at the time, that I use the preferred name in mass emails as well. Receiving an email that says Hi 'Jon'! Is kind of silly, yes? You don't use surrounding quotes in a salutation...
So, let me go back to the original question:
How can you tell Access in a formula in the Control Source, that you want it to place some sort of quotes or brackets around a field, since it won't let you use the usual quotes, parenthesis, or square brackets?
Remember, I'm in a concatenated field, using a bold or italic font option will affect all the text in that field, not just the preferred name. Surely there's a formula for this matter? I've been all over this forum and Microsoft.com and have yet to come across the simple answer for this...
In advance, my thanks for your assistance!
Looks something like this:
=[LastNM]&", "&[FirstNM]& Chr(13)& Chr(10)&[PreferredName]
Which gives a nice little:
Doe, Jonathan
Jon
kind of display.
Now, I wanted to put the preferred name in quotation marks, obviously, Access doesn't like quotation marks, so I can't use those. When I reassessed my expectations, I decided to go into the preferred name field and add single quote marks around the preferred name, which yielded the proper results in the form, which all exported nicely into Excel.
The problem is, that I did not realize at the time, that I use the preferred name in mass emails as well. Receiving an email that says Hi 'Jon'! Is kind of silly, yes? You don't use surrounding quotes in a salutation...
So, let me go back to the original question:
How can you tell Access in a formula in the Control Source, that you want it to place some sort of quotes or brackets around a field, since it won't let you use the usual quotes, parenthesis, or square brackets?
Remember, I'm in a concatenated field, using a bold or italic font option will affect all the text in that field, not just the preferred name. Surely there's a formula for this matter? I've been all over this forum and Microsoft.com and have yet to come across the simple answer for this...
In advance, my thanks for your assistance!