Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Evaluating a concatenated string 1

Status
Not open for further replies.

rfoye

Programmer
Oct 15, 2004
40
US
Is it possible to evaluate a string as the concatenation of a string and variable?

I'd like to store a string such as:
"A new file (" & stParam & ") has been created."
into field "Message" of a table, then retrieve that field value and evaluate the string with the established value of stParam.

Code:
stParam = "Foo123.txt"
stMessage = rs!Message
{do something to evaluate the string}
so that stMessage = "A new file (Foo123.txt) has been created."

Is this possible at all? I tried the EVAL function, and got an error saying it couldn't find stParam.

-------------------
Rob Foye
Database Management
Regions Bank
 
stMessage = Replace(rs!Message, "stParam", stParam)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV. You saved my day.

-------------------
Rob Foye
Database Management
Regions Bank
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top