I would like to be able to build code on the fly and execute it (somewhat like you are able to build a SQL statement as a string and then execute it).
For instance, let's say I have the following:
strFieldName = "Quantity"
strTransactionType = "Sold"
I want to use the strFieldName and strTransactionType to help build the full name of another variable on the fly. The code I want to execute is:
dblQuantitySold = 5
So I'm looking for a way to build the variable name dblQuantitySold using something like:
strExecute = "dbl" + strFieldName+strTransactionType + " = 5"
and then some command that allows me to execute the code.
Any ideas?
The Rookie [sig]<p>John B<br><a href=mailto:dad2mads@home.com>dad2mads@home.com</a><br>[/sig]
For instance, let's say I have the following:
strFieldName = "Quantity"
strTransactionType = "Sold"
I want to use the strFieldName and strTransactionType to help build the full name of another variable on the fly. The code I want to execute is:
dblQuantitySold = 5
So I'm looking for a way to build the variable name dblQuantitySold using something like:
strExecute = "dbl" + strFieldName+strTransactionType + " = 5"
and then some command that allows me to execute the code.
Any ideas?
The Rookie [sig]<p>John B<br><a href=mailto:dad2mads@home.com>dad2mads@home.com</a><br>[/sig]