Hi,
Here is a problem frustrating me and I decide to look for help here:
I attached a demo for your reference:View attachment Update Old Table.accdb
The Relationship structure is like this:

There is a query "Style_Color_Materials_New" functions as New data and a Table "Style_Color_Materials_Old" as old records.
With a Form "Main", there shows two Subforms - "Style_Color_Materials_New" and "Style_Color_Materials_Old", and a button named "Update", pic as below:

What I want to do with this update button is by comparison of "Style_Color_Materials_New" and "Style_Color_Materials_Old" using "Style_Color_No" and "Style_Materials_No" as criteria:
1, Insert new records into table "Style_Color_Materials_Old"
2, Delete no longer exit records from table "Style_Color_Materials_Old"
How to write a VBA code for this button to materialize what I want?
MANY THANKS FOR YOUR HELP!!!!!!!!
Here is a problem frustrating me and I decide to look for help here:
I attached a demo for your reference:View attachment Update Old Table.accdb
The Relationship structure is like this:

There is a query "Style_Color_Materials_New" functions as New data and a Table "Style_Color_Materials_Old" as old records.
With a Form "Main", there shows two Subforms - "Style_Color_Materials_New" and "Style_Color_Materials_Old", and a button named "Update", pic as below:

What I want to do with this update button is by comparison of "Style_Color_Materials_New" and "Style_Color_Materials_Old" using "Style_Color_No" and "Style_Materials_No" as criteria:
1, Insert new records into table "Style_Color_Materials_Old"
2, Delete no longer exit records from table "Style_Color_Materials_Old"
How to write a VBA code for this button to materialize what I want?
MANY THANKS FOR YOUR HELP!!!!!!!!