Thanks for the quick reply. It's actually a pretty simple problem, I just didn't describe it adequately. Basically I have a windows form. This form has fields that the user fills in. In order for the form to be valid certain fields must have certain values. Sometimes, to be valid one field has to be compared to another field on the same form (for example, a user might say that for two of the fields, one must be filled in... they can't both be blank).
The issue is that the rules that determine what makes the form valid are not hardcoded. The actual fields and the rules that make the form valid change from customer to customer. The way the rules are communicated to the program are via a text string. The contents and format of this text string is not yet determined, but must be something that would communicate the "rules" to the program. An example of what this string might look like is [FieldA <> "" or FieldB <> ""] assuming FieldA and FieldB are both fields in the form. Again, the exact contents of this string is not important. What is important is that the contents of this string be able to convey to the program what needs to be true in order for the form to be considered "valid". If the rules are not met, an error msg can be given to the end user and they can then change the data in the form such that the form is then "valid".
So, the issue is that these rules are not hardcoded but need to be somehow communicated to the program, and the program must then look at these rules and process them properly. That's the problem. I cannot find or think of a way to do this "ad hoc" evaluation at runtime. The Jscript reference is probably not important. I pointed it out because somebody else had mentioned that Jscript has a function to evaluate (EVAL function) a statement passed to it at runtime. So Eval("1+2") would return a value of 3. So I tried to figure out if the EVAL function could help me in this case.... it didn't seem to apply.
Bottom line is that I need a way to take this VB code:
If FieldA <> "" or FieldB <> "" then
return "error"
endif
<continue processing>
and have that type of processing done without hardcoding it. Again, the actual conditional will be determined at runtime.
Hope this makes my problem a little clearer. Thanks for any help you can provide.