Eugyn 0 Newbie Poster

In my database there are two tables: the CustOrder table and the Product table.

In my CustOrder winform I have a Product combobox, bound in this way :

cbxProductCode.DataBindings.Add(New Binding("SelectedValue", ds1, "CustOrder.ProductCode"))

and the combobox items comes with the following code:

     With cbxProductCode 
        .DataSource = ds1.Tables("Product")
        .ValueMember = "ProductCode"
        .DisplayMember = "ProductDesc"
     End With 

Everything works fine as I navigate thru various records in this winform.

Problem comes sometimes later when my user deleted certain records in the Product table,
as I navigate the same winform, for those CustOrder records with deleted ProductCode, the combobox just shows nothing, not the previously entered data.

Is there anyway we can do to tell the combobox to display the previously entered data even if it is not exists now in the master table, the Product table ?

Any help is appreciated.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.