A have a created a SQL database and two of the tables are tblOrder and tblIinvoice. In the database diagram I have specified a one-to-one relationship between them.
In my application I have a form to create Orders and a form to create Invoices. When creating an Invoice the user has to choose the Order for which he wants to create the the Invoice, so I display all the Order_ID's in a combobox (Order_ID = Foreign Key in tblInvoice & Primary Key in tblOrder).
But since it is a one-to-one relationship the combobox should display only those Order_ID's that HAVEN'T BEEN Invoiced. So in other words the Order_ID's for the Orders that HAVE BEEN Invoiced should not be displayed in the Combobox. How can I possibly achieve this???
I thought of using a filter statement for the tblOrderBindingSource.Filter on the Invoice form to filter the Order_ID's that will be displayed on the combobox, but I have no idea what should write for the filter statement. Please help.
In my application I have a form to create Orders and a form to create Invoices. When creating an Invoice the user has to choose the Order for which he wants to create the the Invoice, so I display all the Order_ID's in a combobox (Order_ID = Foreign Key in tblInvoice & Primary Key in tblOrder).
But since it is a one-to-one relationship the combobox should display only those Order_ID's that HAVEN'T BEEN Invoiced. So in other words the Order_ID's for the Orders that HAVE BEEN Invoiced should not be displayed in the Combobox. How can I possibly achieve this???
I thought of using a filter statement for the tblOrderBindingSource.Filter on the Invoice form to filter the Order_ID's that will be displayed on the combobox, but I have no idea what should write for the filter statement. Please help.