Hi there!
I have a table which i store my invoices which are divided into 3 categories.
I distinguish them, depending on the value of a field is 1, 2 or 3.
Also, I have a form in which I have 3 check boxes, corresponding to the 3 different invoice categories and I want to make a query in which:
Lets say, if I have selected the first check box (TRUE) IT WILL only show me the category 1 invoices. If I have selected the first and the third check box it will show me the category 1 and 3 invoices etc etc...
I quote you my sql query that does not look to work... Any ideas?
I have a table which i store my invoices which are divided into 3 categories.
I distinguish them, depending on the value of a field is 1, 2 or 3.
Also, I have a form in which I have 3 check boxes, corresponding to the 3 different invoice categories and I want to make a query in which:
Lets say, if I have selected the first check box (TRUE) IT WILL only show me the category 1 invoices. If I have selected the first and the third check box it will show me the category 1 and 3 invoices etc etc...
I quote you my sql query that does not look to work... Any ideas?
Code:
SELECT INVOICES.*
FROM INVOICES
WHERE
And (INVOICES.INVOICE_TYPE = 1 and Forms![FullPaymentInvoiceForm]!CheckInvoice = true)
And (INVOICES.INVOICE_TYPE = 2 and Forms![FullPaymentInvoiceForm]!CheckCredit = true)
And (INVOICES.INVOICE_TYPE = 3 and Forms![FullPaymentInvoiceForm]!CheckProforma = true);