Connect Excel to Access - Group By query

leejayd

New Member
Joined
Aug 30, 2013
Messages
9
Hi,

I'm trying to connect an Excel data table to the results of an Access query.

This works fine using the "From Access" on the Data Ribbon.

The issue I have is with a query that is a 'group by' type. It isn't possible to select this query from the "From Access" table/view selection. If I make the query a standard select it works fine.

Has anyone come across this? or know of a workaround? I can write VBA to get the data but would rather avoid this.

Thanks in advance.
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

leejayd

New Member
Joined
Aug 30, 2013
Messages
9
The plot thickens. I don't think the issue is related to group by. I created a dummy database and a group by query worked fine.

The query I'm trying to consume is rather complex. Sub Queries, CrossTabs and expressions.

I need to determine what is causing the problem.
 

leejayd

New Member
Joined
Aug 30, 2013
Messages
9
Okay - I found the issue was related to NZ(). This checks for null in an expression. I need this to overcome nulls in a pivot query.

Removing the nz solves the problem but gives me another problem. Looks like I'll need to resort to VBA
 

Watch MrExcel Video

Forum statistics

Threads
1,122,483
Messages
5,596,405
Members
414,064
Latest member
Duncthegreat

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
Top