ok I have a multiple for project and I am trying to set what the combobox selection is from another form, but it is not working.
This works fine here....
This does not work...
The only difference in the code is this "gFrmServiceOrder.cboCustomer.DisplayMember = "idCustomer" to this: gFrmServiceOrder.cboCustomer.DisplayMember = "FullName"
Can someone give me some assistance please.
This works fine here....
VB.NET:
Public Sub PopulateCustomerNamelist(Optional idCustomerSelected As Integer = 0)
gFrmServiceOrder.cboCustomer.DataSource = Nothing
gFrmServiceOrder.cboCustomer.DataSource = DL.GetCustomerNameList
gFrmServiceOrder.cboCustomer.DisplayMember = "idCustomer"
gFrmServiceOrder.cboCustomer.ValueMember = "idCustomer"
If idCustomerSelected <> 0 Then gFrmServiceOrder.cboCustomer.SelectedValue = idCustomerSelected
End Sub
This does not work...
VB.NET:
Public Sub PopulateCustomerNamelist(Optional idCustomerSelected As Integer = 0)
gFrmServiceOrder.cboCustomer.DataSource = Nothing
gFrmServiceOrder.cboCustomer.DataSource = DL.GetCustomerNameList()
gFrmServiceOrder.cboCustomer.DisplayMember = "FullName"
gFrmServiceOrder.cboCustomer.ValueMember = "idCustomer"
If idCustomerSelected <> 0 Then gFrmServiceOrder.cboCustomer.SelectedValue = idCustomerSelected
End Sub
The only difference in the code is this "gFrmServiceOrder.cboCustomer.DisplayMember = "idCustomer" to this: gFrmServiceOrder.cboCustomer.DisplayMember = "FullName"
Can someone give me some assistance please.