0
votes

I've got a question. I need to update a database with an append query, but I do not know how I can start. I have to compare two tables. One is the source where normally new Items will be updated. the other table is the target where I would like to create new entries. I don't how I can create new items on the table.

Best regards

Matthias

2

2 Answers

0
votes

if you go into 'design view' in a new query, then 'show table', add the two tables you are comparing. Then double click on one of the values you are comparing.

Under criteria, insert the field you are comparing with, i.e:

[table name].[field name]

When done that, test the query, make sure the values are the same (assuming this is what you need to do?)

Now hit the 'append' button, you should see a dialog pop up: select the table you wish to append to. 'Append to' should display the field to be inserted: add all required fields and then run the query.

Hope that helps.

0
votes

To append using sql and DAO/ADODB using VBA, look at the INSERT INTO sql commands. Here is the MS page