Variable is not declared error when using a field from form

Variable is not declared error when using a field from form

Hi everyone.

I have a form for courses that has a Maximum_Capacity field and a Currently_Enrolled field.  I'm trying to retrieve all Course_Name's where Currently_Enrolled < Maximum_Capacity.  All of these inputs are declared in my Add_Form and I'm trying to access them in a new form called Enroll_Form.  I used the Script Builder to set it up, but when I try this: "opt = Add_Course[Currently_Enrolled < Maximum_Capacity].Course_Name;" I receive an error stating that "Variable 'Maximum_Capacity' is not defined."  Any ideas on why I am receiving this error?  If I use 30 instead of Maximum_Capacity, the script accepts the code.  I already checked to make sure that the Maximum_Capacity is numeric.  Any help will be greatly appreciated!

Best Regards,
Mike