CrystalSurfer
Matrix activist
- Local time
- Today, 11:40
- Joined
- Jan 11, 2006
- Messages
- 75
Hi all,
I have created a form that lists work to be invoiced.
However I have a problem with the following WHERE clause in the query source:
I only want to show lines that have a month less than or equal to the selected month on the form.
Unless I've got this all wrong (which I have otherwise I wouldnt be here!) it appears to convert the first part of the check into a character value because when I select September (month 09) it shows more lines than if I select October (10).
This means that the calculated months of 10, 11 and 12 are shown because they are less than "9" but not "10".
For info, the month calc uses fields from tables A and F. It is also returning a value of 13 in those conditions that need to be filtered out.
Please can someone put me out of my misery.
Thanks.
I have created a form that lists work to be invoiced.
However I have a problem with the following WHERE clause in the query source:
Code:
WHERE (
IIF(
A.DateComplete is not null,
Month(A.DateComplete),
IIF(A.Fee is not null,
IIF(F.DateSpecific=False,
1,
13),
13,
)
)
<=([Forms]![frmInvoiceRun01].[cboMonth])
)
I only want to show lines that have a month less than or equal to the selected month on the form.
Unless I've got this all wrong (which I have otherwise I wouldnt be here!) it appears to convert the first part of the check into a character value because when I select September (month 09) it shows more lines than if I select October (10).
This means that the calculated months of 10, 11 and 12 are shown because they are less than "9" but not "10".
For info, the month calc uses fields from tables A and F. It is also returning a value of 13 in those conditions that need to be filtered out.
Please can someone put me out of my misery.
Thanks.