Using Macro with Append Query - Edit mode?

TomRenish

Board Regular
Joined
Aug 18, 2009
Messages
90
Hi there,

My google-fu failed me, so coming here instead.

I have created a macro which has a single command of "OpenQuery 'MyAppendQry'"

MyAppendQry is obviously attempting to append data to a table. The table in question has an alpha-numeric key that was generated by Salesforce, but the table itself is local to Access.

The question is: when using the macro to run the append query, there is an opportunity to set the query's "Data Mode" to either Edit, Add, or Read-Only. Now, I know for a fact that the query is reading from a different table which contains all the same record IDs (same key) as the destination table and Access subsequently pukes on Access Key violations, but shouldn't "Edit" mode compare keys for these records and simply update other field data in the same record where there are differences?

When I do this same thing with an ODBC-linked QuickBase table, it behaves as desired. But with a local Access table or an ODBC-linked MySQL table, no dice.

Or to put it another way, what the heck is "edit" supposed to do if it's not able to edit existing records?

Thanks!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
To edit existing records in a table, you would want to use an "Update Query".

Update Queries will only update existing records.
Append Queries will only add new records.
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,836
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top