Dave,
That's the problem. You are setting the data source to
"this.dsfrmRestock_ProductSelect1", and then getting the BindingContext for
the "Product" member in "this.dsfrmRestock_ProductSelect1". Your call
really needs to be:
bmProduct = this.BindingContext[dsfrmRestock_ProductSelect1];
That will give you the appropriate binding context.
--
- Nicholas Paldino [.NET/C# MVP]
-
(E-Mail Removed)
"Dave" <(E-Mail Removed)> wrote in message
news:82F0257D-AE4B-4942-B1EF-(E-Mail Removed)...
>
> Sorry, I didn't state that the error is on last line below.
>
> BindingManagerBase bmProduct
> bmProduct = this.BindingContext[dsfrmRestock_ProductSelect1, "Product"];
>
>
> this.cmbProduct.DataSource = this.dsfrmRestock_ProductSelect1;
> this.cmbProduct.DisplayMember = "frmRestock_ProductsSelectCommand.Name";
> this.cmbProduct.ValueMember = "frmRestock_ProductsSelectCommand.Barcode";
> bmProduct = this.BindingContext[dsfrmRestock_ProductSelect1, "Product"];