954,541 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Adding items from a different table in a combobox which is a different table.

Hello guys, Please i have a problem and i need help.Please
I have two table called

1.Register product table
2.Sell product table

Register product table consist of (Product Id (txtProdId.text) and
Product Name(txtProdName.text)) NB. All are textboxes

Sell product table consist of (Product Name(cboProdName.text) and ProdPrice
(txtProdCost.text)). NB. ProductName over here is a combobox.

When someone saves record in the Register product table, items should be
added into the combobox into Sell product table. Please how will I go about
it.

wilfredkojo
Newbie Poster
2 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

Is Product Id is primary key? if yes then have that key as forein key in
Sell product table. When item is added to Register product table add the product key
and other valu in Sell product table. join the two atbles and get the records and load to ur combobox.

Pgmer
Master Poster
714 posts since Apr 2008
Reputation Points: 54
Solved Threads: 121
 

Yes product id is a primary key but what codes will I use so that
items will be added and load into the combobox.

wilfredkojo
Newbie Poster
2 posts since Feb 2011
Reputation Points: 10
Solved Threads: 0
 
cboProdName.items.add(txtProductname.text)


You want to save the record in db?

Pgmer
Master Poster
714 posts since Apr 2008
Reputation Points: 54
Solved Threads: 121
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: