Hello all,
I am in the process of building a database system to manage the work hours allocation in the company i work form.
Within a query i have a field called Invoiced, this is a Yes/No value
In the query, the criteria:
Yes or No
works to display BOTH the invoiced and not invoiced entries
Like "*"
also works the same.
In a separate form i have one checkbox for ShowInvoiced, and another for ShowNotInvoiced
In the query i have set up a simple nested iif statement that should show me depending on the status of the tickboxes either the Invoices, NotInvoiced or Both.
However, when i try to use the IIf statement, the 'Yes or No' and 'Like "*"' values do not work as they did when they were typed on their own...
Here are some simplified test IIf statement that do NOT work as expected in the query criteria(though i have tested the statement itself works OK as if i change the values to either Yes or No it behaves accordingly?
IIf([forms]![frmHoursEnquiry]![InvoicedCheckBox]=Yes,Yes or No,No)
IIf([forms]![frmHoursEnquiry]![InvoicedCheckBox]=Yes,Like "*",No)
I tried adding brackets but that did not make a difference...
Would anyone have any suggestions on how i can get this to work?
Thanks in advance
I am in the process of building a database system to manage the work hours allocation in the company i work form.
Within a query i have a field called Invoiced, this is a Yes/No value
In the query, the criteria:
Yes or No
works to display BOTH the invoiced and not invoiced entries
Like "*"
also works the same.
In a separate form i have one checkbox for ShowInvoiced, and another for ShowNotInvoiced
In the query i have set up a simple nested iif statement that should show me depending on the status of the tickboxes either the Invoices, NotInvoiced or Both.
However, when i try to use the IIf statement, the 'Yes or No' and 'Like "*"' values do not work as they did when they were typed on their own...
Here are some simplified test IIf statement that do NOT work as expected in the query criteria(though i have tested the statement itself works OK as if i change the values to either Yes or No it behaves accordingly?
IIf([forms]![frmHoursEnquiry]![InvoicedCheckBox]=Yes,Yes or No,No)
IIf([forms]![frmHoursEnquiry]![InvoicedCheckBox]=Yes,Like "*",No)
I tried adding brackets but that did not make a difference...
Would anyone have any suggestions on how i can get this to work?
Thanks in advance