
Eval function using a custom typed variable
Situation:
I am storing an expression to be evaluated in a table:
gFile.State = "CA"
gFile being a custom typed global structure
I store this expression in a table to be evaluated to determine if a
specific form should print (many forms are being considered for
printing)
Problem:
I am trying to use the Eval function to determine if the global
variable gFile.State is equal to the string "CA". If I type
Eval(gFile.State = "CA") in the debug wimdow the code is evaluated
properly. When I loan the string "gFile.State = 'CA'" into a local
module variable (tVar) and then Eval(tVar) I get an error on gFile due
to the "." period in the expression for the type variable. The tVar
indeed holds "gFile.State = 'CA'"
Is there a problem using Eval with global variable or typed variables?
Has anyone tried this and have a workaround?
I have a workable solution but it is code intensive, any help will be
appreciated.
Thanks in advance
Frank Tuttle