cannot find action query

RSXchin

Well-known Member
Joined
Oct 23, 2010
Messages
758
I'm having trouble running update and delete external sql queries. When I try to run them, I get a "cannot find action query" error. Anyone know how to fix this?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I've never seen this error before.
Can you provide more information:
1) the kind of database you are accessing,
2) the complete error message,
3) the error number,
4) and, the method by which you are running the query?
5) if you are running this in VBA code, also the relevant code.
 
Upvote 0
1) I was using another spreadsheet to learn about queries
2) cannot find action query
3) no error number
4) After creating a connection, I went to the edit query section
5) N/A

The query I was trying
Code:
Update [Table1$]
set Test = 'b'
where Test = 'a'

Delete doesn't work either
 
Upvote 0
Interesting. Got me - when you say you created a connection, how did you create the connection? How is the data structured on the other sheet (is it a named range, or an actual Excel Table)? Can you successfully run SELECT queries on the data source (this can help narrow down the problem if we know that Select queries work but Update queries don't)? What version of Excel are you using?
 
Upvote 0
1) I goto import data (I don't want to import it as a spreadsheet)
2) It uses the top row as the header, which is Test in this case
3) Select queries are no problem
4) excel 2003... My work is cheap.
 
Upvote 0
This works for me:
Code:
UPDATE `C:\Documents and Settings\<user>\Desktop\Book1.xls`.`Sheet1$` `Sheet1$`
SET `Sheet1$`.Test='b' 
WHERE (`Sheet1$`.Test='a')

I personally don't have much patience with MSQuery - you have to learn it's quirks. You could do worse than read Zapawa's book on "Advanced Excel Reporting" - I did once but now I stick to ADO most all the time.
 
Upvote 0
I'm starting to think that I just don't have that capability... Thanks for the effort though.
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,898
Members
452,948
Latest member
Dupuhini

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