Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bound Combo

Status
Not open for further replies.

mtompkins

IS-IT--Management
Jan 14, 2003
166
US
Sorry if this is a bit basic - my first VB / SQL app.

SQL 2005 with:
dbo.Employee
EmployeeID (int,PK)
LastName (nvarchar50)

dbo.Purchase Orders
PurchaseOrderID (int,PK)
EmployeeID (FK, int)

On Form1 I have a bound combo box:
DataSource: EmployeesBindingSource
DisplayMember: LastName
ValueMember: EmployeeID

When I run the app the combo box populates with LastName fine. When I select an entry however, the application will not function foward. If I type into the combo box the digit for EmployeeID - everything moves on fine.

I'm taking this to indicate that the control is not pushing the EmployeeID value back to the DataSet and is pushing the text (LastName) value.

I would appreciate help in learning how to sort this.

Thanks.
 
As you are just starting developing, I STRONGLY suggest that you search these forums and google for BOUND vs UNBOUND controls, and make your move forward based on that.
Using BOUND will be the cause of great headaches for you.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
I would suggest that you create a Sub that refreshes the combo box with the latest values in the recordset (what you call dataset) "manually" rather than using binding to accomplish it.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top