Click here to Skip to main content
15,911,132 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
Private Sub BtnEdit1_Click() 
        SQL = "SELECT * FROM ASSET_OPTION"
        RS.Open SQL, CON, 1, 2
        RS.AddNew
    Else
RS.Open "SELECT A.*,B.* FROM ASSET_OPTION A,ASSET B WHERE B.AID=A.AID AND ASSET_NAME= '" & Combo4.Text & "'", CON, 1, 2
    End If

    RS!AO_ID = Text1.Text
    RS!AID = Combo4.ItemData(Combo4.ListIndex)
    RS!LOC_ID = Combo1.ItemData(Combo1.ListIndex)
    RS!IDLE_SINCE_DATE = DTPicker2.Value
    RS!REASON_IDLE = Text8.Text
    RS!UTILIZED_PERIOD = DTPicker3.Value
    RS!FREE_ON_DATE = DTPicker4.Value
    RS!P_COST = Text3.Text
    RS!P_DATE = DTPicker1.Value
    RS!CURRENT_STATUS = Combo2.Text
    RS!SALE_STRATEGY = Text7.Text
    RS!OFFER_RECEIVED = Text5.Text
    RS!EXPECTED_VAL = Text6.Text
    RS.Update
    RS.Close
End Sub

I am having
[1] Asset master with aid PK,
[2] Location master with loc_id PK,
[3] Asset_option table having FK's aid and loc_id and ao_id PK.........

Now I wanna modify loc_id of asset and asset_option as well using above code(using asset_option table)......

The above code updates loc_id of asset master only not of it's own table asset_master....

Plz help.........
Posted
Updated 12-Mar-13 5:35am
v2

1 solution

hi cool_sari
you can use trigger of that table you are insert the record
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900