I have a report that is an almost exact replica of an invoice form. The only difference is that the report has an unbound/calculated field that displays a shorter description of the first line/record in the reports subreport (the first item/product listed). i created that field only because I need a report of invoices (preferably in the exact same layout as the invoice form) and be able to filter by the first item/product in that invoice.
Example... Show me all invoices that include the product "coffee" as the first item.
I have one of two problems I cant figure out. First in a separate control (button) that opens the report I need to filter by that unbound field.
DoCmd.OpenReport "Invoices", acViewReport, , "[FirstItem] = 'Coffee'"
Upon clicking the control I get a dialog to enter parameter for FirstItem...
No matter what I do I cannot get rid of that dialog. I am assuming I am getting this "error" because the field [FirstItem] is not in the reports underlying query but is an unbound/calculated field, and hence has no value until a record is opened and no record is being opened to have a value to filter by.
I can live with a workaround of opening all records and just grouping by the field [FirstItem], but there is no option to group by that field. Again assuming that it is because it is an unbound field.
Does anyone have any suggestions on how to solve either of the above problems?
Example... Show me all invoices that include the product "coffee" as the first item.
I have one of two problems I cant figure out. First in a separate control (button) that opens the report I need to filter by that unbound field.
DoCmd.OpenReport "Invoices", acViewReport, , "[FirstItem] = 'Coffee'"
Upon clicking the control I get a dialog to enter parameter for FirstItem...
No matter what I do I cannot get rid of that dialog. I am assuming I am getting this "error" because the field [FirstItem] is not in the reports underlying query but is an unbound/calculated field, and hence has no value until a record is opened and no record is being opened to have a value to filter by.
I can live with a workaround of opening all records and just grouping by the field [FirstItem], but there is no option to group by that field. Again assuming that it is because it is an unbound field.
Does anyone have any suggestions on how to solve either of the above problems?