Variables within String variables possible?

perlfan

Registered User.
Local time
Today, 12:35
Joined
May 26, 2009
Messages
192
Nesting variables within string variables possible?

Hi - I have a small access application where I have several text segments (like email subjects and bodies) which can be edited by users.

These text segments/string variables shall contain variables, like names etc. Users should be able to place those variables as they like within e.g. an email body (e.g. Hello {firstname}, etc.).

I work with Access + MySQL. Is something like that possible?

Thanks for help! FRANK
 
Last edited:
Well, yes. One way to do this is to make use of Replace() function to scan the text within string variable for something like {FirstName} and replace it with appropriate value. You'd probably give your users a dropdown that lists valid tokens for users to select while building the complete text, then once the text is assembled in entirety, replace all tokens with values.
 
Works great - thanks a lot! Regards, Frank
 

Users who are viewing this thread

Back
Top Bottom