Nested Queries with ADO

cstimart

Well-known Member
Joined
Feb 25, 2010
Messages
1,180
I have a nested query that I created in Access. I'm then trying to use the SQL in Excel/VBA and ADO. I am getting a "syntax error in query expression" error.

I reviewed the code and it appears to be correct, so I am assuming that ADO can't handle the nested query? Or that there is some additional steps that I need to incorporate into the code? :confused:

Any ideas?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
ADO can handle nested queries, so I guess that rules out that. I'm not sure what solutions to suggest though - hard to say without more to go on.

ξ
 
Upvote 0
Suggest you post the SQL. Or otherwise, progressively simplify the code to identify what element of the SQL is syntactically wrong; or going the other way, start from simple SQL and increase the complexity until the problem is identified. Immediate thoughts are use of Access functions not available from Excel, different syntax in the SQL, different wildcard from Excel.
 
Upvote 0

Forum statistics

Threads
1,224,885
Messages
6,181,585
Members
453,055
Latest member
cope7895

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