Access query from Excel

peperosso

New Member
Joined
Oct 13, 2015
Messages
8
Hi everyone, and thanks in advance for your help.
I have a splitting headache dealing with queries in excel.:confused:
I have an apparently simple problem. I would like to trigger an Access query from Excel and subsequently to export the results to my spreadsheet. What is more, I would like to use a query with a WHERE clause depending on the value a cell contained in my Excel file, and I would like to trigger the query when the latter is modified. However, I had some issue to retrieve a piece of code that I can use to run this operation.
I have thought of using pivot tables in order to extract the data from Access and filtering them with VBA, but the performance of this operation is quite dissatisfying. I have also tried to use MS query, but I could not find a way to call my query from VBA and to custom it with the values contained in my spreadsheet.

Therefore, I guess that the sole viable way to solve this issue is to call the sql directly from excel, using the Access db as a target. I found ways of intercting with the db and to query it, but I have no clue on how I can customize my queries with values taken from Excel (queries called from excel are included in quotes). Do you have any other idea on how I could do that?


Thank you:biggrin::biggrin:
 

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)

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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