Actually as you remember I worked with two tables "sales" and "History" now I added another one table which called Notes and assigned the FK_salesID to make the relationship between the tables history and sale(see attachment) the purpose I joined this table is because I would like to delete the columns "status and status1" from the sales table and work with these columns in the notes.

Now my challenge is how to change the code.... I was trying couple of thing but it is not really working.

You can't insert into the two tables in a single statement, so you need to execute a second query to insert into your Notes table.

How you go about it depends on how you intend to manage the notes data (is it editable, or do you just need to add extra rows? are you storing multiple per sales item? etc). Although if you only had one Status/Notes entry per Sales record, then those columns would be better off in the Sales table anyway.

I'm not quite sure what you are trying to achieve at the moment. Where does the update to the Sales table come into things?

Based on what you said about there only being one set of Status/Notes for the Sales item, I would move those two columns to the Sales table. The you just need to update the column list and parameters for the Update query on the sales table to include the Notes and Status fields.

What I'm trying to achieve now is to update the new related table notes that contains two columns note and status these columns updates just one time for each item for example I don't need to update these columns they why I updating the history as these columns just update one line.

for now I have added this insert command under "for method":
I attached some screenshot maybe it will help to understand my thought.

I get what you are trying to do, i just don't quite understand why you have the notes and status in a separate table. IF you have those two columns in a separate table then it gives you the additional problem that you need to know if you already have a row available that needs updating or, if it's a new sales record, if you need to add an extra row.

Assuming you're keeping them in a separate table, and that the record already exists, you would be looking at something like:

There's no reason why copying between two databases should override the status and notes columns. You can quite easily copy between databases and restrict the column list if you don't want the whole row updating.

Copying between tables you specify the column list like you do with any other query. So say, for example, you wanted to copy only the Customer and Account columns from a sales table in one database to the sales table in another: