P
Paul James
I'm trying to obtain records where the criteria for a Receipt_ID field meets
the following conditions:
If a control in a form (forms!frmReceipts!chkMatched) is checked, I'd like
the criteria to be equal to the value in another control in that form
(forms!frmReceipts!txtReceiptID). Otherwise I'd like the criteria to allow
all values in the Receipt_ID field.
I've tried to use the expression
IIf([forms]![frmReceipts]![chkMatched]=-1,[forms]![frmReceipts]![ReceiptID],
Like "*")
and while this expression returns the desired records when the IIf condition
is true, it doesn't return any records when the condition is false.
The records are there in the table, so they exist. What can I put in place
of the expression Like "*" so that the query will return all records when
the IIf condition is false?
Thanks in advance,
Paul
the following conditions:
If a control in a form (forms!frmReceipts!chkMatched) is checked, I'd like
the criteria to be equal to the value in another control in that form
(forms!frmReceipts!txtReceiptID). Otherwise I'd like the criteria to allow
all values in the Receipt_ID field.
I've tried to use the expression
IIf([forms]![frmReceipts]![chkMatched]=-1,[forms]![frmReceipts]![ReceiptID],
Like "*")
and while this expression returns the desired records when the IIf condition
is true, it doesn't return any records when the condition is false.
The records are there in the table, so they exist. What can I put in place
of the expression Like "*" so that the query will return all records when
the IIf condition is false?
Thanks in advance,
Paul