Recordset.update Not Working on Certain Queries

leishtheman15

New Member
Joined
Jan 17, 2013
Messages
22
Hi

I encounter a VBA error when trying to use the recordset.edit recordset.update combo on some recordsets. I was hoping somebody could explain why it works on some and not others?

The SQL queries behind the recordsets tend to be simpler when the above works, e.g. they will typically be retriving data from 1 table only. If the SQL contains joins, this is when I tend to experience difficulties.

Of course, I could just use SQL UPDATE query, but I'd like to understand the above in any instance for reference. I've tried Googling it but couldn't find an answer, can anybody help?

Many thanks,
Andy
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Always post the error number and message. Since different queries are involved from time to time, it could be practically anything from where I sit. If you can't turn a copy of the select query into an update that will not choke when you try to go to datasheet view (i.e. without running it), then I suspect the select query recordset is not updatable. For that I'd suspect defined relationships could be the issue - you are trying to update the "many side" only.
 
Upvote 0

Forum statistics

Threads
1,214,902
Messages
6,122,161
Members
449,069
Latest member
msilva74

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