I have a Work Order table containing "Date_Opene d" and "Date_Close d" fields amongst other data. I have a query that populates a subform with data from the Work Orders table based on the value of an option group on the main form.
The query contains a calculated field Called "Open" that contains the following
to report the status of the work order. The "Open" calculated field also contains a criteria that checks the value of the option group in the parent form and Returns: Open Work Orders if the Option Group value is 1; Closed Work Orders if the value is 2; and all records if the value is anything other than 1 or 2. I’ve tried several different expressions and can get values 1 and 2 to work but cannot get it to return all records. The current expression is
. 1 returns “Open” records as expected; 2 returns “Closed” records as expected; but 3 returns an error stating the expression is too complex.
Specific help would be greatly appreciated as my knowledge of expressions is limited.
Thank you!!!
The query contains a calculated field Called "Open" that contains the following
Code:
Open: IIf(IsNull([tbl_Work_Orders]![DATE_CLOSED]),1,2)
Code:
IIf(Forms![frm_Work_Order_Main]![optgrp_Show_Recs]=1, 1, IIf(Forms![frm_Work_Order_Main]![optgrp_Show_Recs]=2,2, “*”))
Specific help would be greatly appreciated as my knowledge of expressions is limited.
Thank you!!!
Comment