I have a query with field [SL NO] having values from 1 to 30.
I wish to control this field using an unbound text box [Text1] in another form say FORM-A in such a way that if [Text1]="APPLE" then [SL NO] field gives out values less than 13. If [Text1]="MANGO" then [SL NO] field gives out values less than 25. For other values of [Text1], [SL NO] field outputs all values from 1 to 30.
I am trying to make a If..Then..else statement but as I am new to SQL I keep getting Operand/Syntax errors.
Any help on getting the correct statement will be appreciated.
Thanks in advance.
I wish to control this field using an unbound text box [Text1] in another form say FORM-A in such a way that if [Text1]="APPLE" then [SL NO] field gives out values less than 13. If [Text1]="MANGO" then [SL NO] field gives out values less than 25. For other values of [Text1], [SL NO] field outputs all values from 1 to 30.
I am trying to make a If..Then..else statement but as I am new to SQL I keep getting Operand/Syntax errors.
Any help on getting the correct statement will be appreciated.
Thanks in advance.