Hi!

I'm trying to write a function with the following purpose:

I'll have a few forms (3-5) and in each of them there'll be some commad buttons to perform some actions. These buttons will become enabled once some controls (textboxes, comboboxes, etc) have certain values in them. What I want is to have a function that returns a true value if all the conditions are met. My idea is a follows:

1) I'll send an array of conditions (string variables) with the following format: "TxtBox_Name_Available = Available, TxtBox_Rate = has numeric value", ComboBox_Month = has a month, ComboBox_Year = has a year". (ControlName = Control.value)
2) The function will then procede to compare each control's value against the expected content that validates the condition as true.
3) If all conditions are true then the function returns true. If only one conditions is not true then the functions returns false and the commad button remains disabled.

I think I can build the function if it's going to be used only for the controls on one form but I'd like it to handle as many forms as I want. I thought that maybe, the form could be sent as a parameter but I really don't know how. So far, the functions looks like this:

Please Login or Register  to view this content.

Thanks for any ideas!