Hi There,
I have these table:
tblInvoice
tblInvoiceDetail (Related to tblInvoice)
tblProduct (chosen through a combo box on a subform based on a query.)
I have a combo box where you can select products by its ProductID.
However, I would like that item, once selected and added to tblInvoiceDetail, to be removed from the cmbProductID list but would re-appear on the list once a new Invoice has been made. The purpose being that to prevent duplicate items being added to the same tblInvoiceDetail.
I tried having to query the two tables, tblProduct using jointype #2 to tblInvoiceDetail and using the "Is Null" criteria on the field InvoiceID. This works at first, but the list does not re-include those items in a new invoice since their InvoiceID have already been filled (not null anymore) and therefore would not re-appear on the new Invoice.
I tried to use the value of the cmbProductID itself for the criteria but the one I did in the cmbProductID query does not seem to work.
I have included a sample of the database I have made.
I have these table:
tblInvoice
tblInvoiceDetail (Related to tblInvoice)
tblProduct (chosen through a combo box on a subform based on a query.)
I have a combo box where you can select products by its ProductID.
However, I would like that item, once selected and added to tblInvoiceDetail, to be removed from the cmbProductID list but would re-appear on the list once a new Invoice has been made. The purpose being that to prevent duplicate items being added to the same tblInvoiceDetail.
I tried having to query the two tables, tblProduct using jointype #2 to tblInvoiceDetail and using the "Is Null" criteria on the field InvoiceID. This works at first, but the list does not re-include those items in a new invoice since their InvoiceID have already been filled (not null anymore) and therefore would not re-appear on the new Invoice.
I tried to use the value of the cmbProductID itself for the criteria but the one I did in the cmbProductID query does not seem to work.
I have included a sample of the database I have made.