0

dear friends,
i want to update the table2 field which is same as table 1 field in ms accessdatabase.
when ever i enter data in table1, table2 field which is same as table1 field should updated.table1 and table2 are connected to form1, form2 seperately.
i request any body, please let me know the code to transfer data from table1 to table2 and update table2 simultaneosy.

3
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by regalla_c
0

Hi,

In "Save" button of First Table, Insert same Data in Second table as well..
Say, if ID is a PK in your first table, and Second table is same structure as first, then after adding(Save) record, you can run an Insert statement like this:

sSQL = "Insert Into Table2 Select * From Table1 Where ID = " & MyID
Conn.Execute sSQL

Same thing you can do when Editted, Delete the Record from table2 and Insert from table1 (Depending on the ID)

REgards
Veena

0

thank you veena

Hi,

In "Save" button of First Table, Insert same Data in Second table as well..
Say, if ID is a PK in your first table, and Second table is same structure as first, then after adding(Save) record, you can run an Insert statement like this:

sSQL = "Insert Into Table2 Select * From Table1 Where ID = " & MyID
Conn.Execute sSQL

Same thing you can do when Editted, Delete the Record from table2 and Insert from table1 (Depending on the ID)

REgards
Veena

0

thank you veena for your reply

Hi,

In "Save" button of First Table, Insert same Data in Second table as well..
Say, if ID is a PK in your first table, and Second table is same structure as first, then after adding(Save) record, you can run an Insert statement like this:

sSQL = "Insert Into Table2 Select * From Table1 Where ID = " & MyID
Conn.Execute sSQL

Same thing you can do when Editted, Delete the Record from table2 and Insert from table1 (Depending on the ID)

REgards
Veena

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.