I have a table that I'm using in a query. The table has 24 fields which are Period01, Period02...Period24. Depending upon what the user selects in a form I want the appropriate field to be put into the field box in the query. The only thing I could find that works is a nested "IIF" statement such as:
period: IIf(([forms]![BSTO]![month])="JAN",([period12]),(IIf(([forms]![BSTO]![month])="FEB",([period11]),(IIf(([forms]![BSTO]![month])="MAR",([period10]).........
The problem is that once I get more than 5-6 "nested" statements, Access says that the statement is too complex or that it exceeds 255 charactor limit. How else can I choose which field goes into the quesry?
Thanks!!
period: IIf(([forms]![BSTO]![month])="JAN",([period12]),(IIf(([forms]![BSTO]![month])="FEB",([period11]),(IIf(([forms]![BSTO]![month])="MAR",([period10]).........
The problem is that once I get more than 5-6 "nested" statements, Access says that the statement is too complex or that it exceeds 255 charactor limit. How else can I choose which field goes into the quesry?
Thanks!!