0
Answer

How to retrieve FK details from PK at another table in VB.NET

mohamad guntur

mohamad guntur

12y
1.1k
1
I got some issue when adding items in the form which contains FK from PK at another tables, so the data is related eah other.

PRODUCT            PURCHASE
-----------        -------------
ID_PRODUCT        ID_PURCHASE
NAME                 ID_PRODUCT
QTY                   DATE
PRICE                 QTY
                        TOTAL

I'm trying to manage. the frmPurchase.

1. The ID_PRODUCT from frmPurchase is using combobox so, the user can see the available PRODUCT are exists in database. and I also add the textbox txtNAME, txtQTY (which available in the PRODUCT table), and also the txtPRICE. After the user clicking the selected ID_PRODUCT at frmPurchase, the textbox automatically show the data from PRODUCT table

2. TOTAL from PURCHASE table got from QTY(PURCHASE table) * PRICE (PRODUCT table), how to use this formula in VB.NET

3. How to get the validation at VB.NET if the QTY on PURCHASE table higher than QTY on PRODUCT table?

thx in advance