Evaluating a variable

G

Guest

Is there a way to determine the contents of a variable given the variable name as a string?

I'm trying to do something like the switchboard with a column I'll call Paramter. This column will contain something like "[ProductId]=?". I can parse the string so that I have a variable (FormParam) that equals "ProductId", and I want to find out what Me.ProductId contains.
 
P

Paul Johnson

Use Eval(FormParam) to evaluate the expression contained in the string
variable FormParam, i.e., this will return the contents of ProductID when
FormParam="ProductID" or "Me.ProductID"

Paul Johnson

H Robert King said:
Is there a way to determine the contents of a variable given the variable name as a string?

I'm trying to do something like the switchboard with a column I'll call
Paramter. This column will contain something like "[ProductId]=?". I can
parse the string so that I have a variable (FormParam) that equals
"ProductId", and I want to find out what Me.ProductId contains.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top