Hey all,
DB background: consists of 5 tables, multiple forms, reports and queries. This db is being designed with low tech end users in mind, there for everything is basically form operated.
The issue: There is a report that is generated when an order is entered, this report is pulled from a query that combines all tables. This query is designed to be operated with a criteria that filters one of the tables primary keys to return a single record. The report is generated on order entry, but also needs to be generated on a status form as well. In a attempt to avoid two versions of the report and two versions of the query I am attempting to create an expression in the query to pick which form it checks for the value to use as criteria. I have attempted multiple different expressions, and I do have the expression functional except it still pops the parameters box for the unloaded form. If you null it out the expression continues as expected. I am looking to have it not show the enter parameter box and have you null it out to continue.
Expr: Iif(IsNull([Forms]![FormName]![ControlName]),[Forms]![FormName2]![ControlName2],[Forms]![FormName]![ControlName])
TL;DR: The above expression works, but will still pop the parameter box for the first form if it is not loaded. I have also tried IsMissing, IsObject, IsEmpty as hail Mary's. If I have to create a module I will, was just hoping to avoid it.
Thank you!
DB background: consists of 5 tables, multiple forms, reports and queries. This db is being designed with low tech end users in mind, there for everything is basically form operated.
The issue: There is a report that is generated when an order is entered, this report is pulled from a query that combines all tables. This query is designed to be operated with a criteria that filters one of the tables primary keys to return a single record. The report is generated on order entry, but also needs to be generated on a status form as well. In a attempt to avoid two versions of the report and two versions of the query I am attempting to create an expression in the query to pick which form it checks for the value to use as criteria. I have attempted multiple different expressions, and I do have the expression functional except it still pops the parameters box for the unloaded form. If you null it out the expression continues as expected. I am looking to have it not show the enter parameter box and have you null it out to continue.
Expr: Iif(IsNull([Forms]![FormName]![ControlName]),[Forms]![FormName2]![ControlName2],[Forms]![FormName]![ControlName])
TL;DR: The above expression works, but will still pop the parameter box for the first form if it is not loaded. I have also tried IsMissing, IsObject, IsEmpty as hail Mary's. If I have to create a module I will, was just hoping to avoid it.
Thank you!