How to select all months from a table to include in a report
Hello Frank.
"FSHOTT" wrote:
[snip] The problem is I have a "AllMonths" entry in the Month combo
list which I would like to include all month rows for the specific
supplier and year in the report. I have tried [snip]
1) SELECT * FROM qryPurchasingTable WHERE
((MyYear=Forms!frmSupplierReportCardEmailForm!cboY ear) Or
(Forms!frmSupplierReportCardEmailForm!cboYear Is Null)) And
(IIf(Forms!frmSupplierReportCardEmailForm!cboMonth ="AllMonths",
(MonthNo Between 2 And 11),
(MyMonth=Forms!frmSupplierReportCardEmailForm!cboM onth)))
And (SupplierNo=GetSupplierID()); [snip]
SELECT * FROM qryPurchasingTable WHERE
((MyYear=Forms!frmSupplierReportCardEmailForm!cboY ear) Or
(Forms!frmSupplierReportCardEmailForm!cboYear Is Null)) And
((Forms!frmSupplierReportCardEmailForm!cboMonth="A llMonths") Or
(MyMonth=Forms!frmSupplierReportCardEmailForm!cboM onth)) And
(SupplierNo=GetSupplierID());
--
Regards,
Wolfgang
|