access report in excel

I import data from odbc into excel. I want to start the access report from a macro button in excel. Is this possible? Without access itself being started..

Im using microsoft query to always keep the data in my excel sheet updated. But I need to show this data like a concatenated list, like you can do with reports in access.

Or, if theres a way of grouping and showing the data like a report in excel I guess that would be the best.?
bergsprekkenAsked:
Who is Participating?
 
Arno KosterCommented:
in general that would be something like

Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "c:\path_to\database.mdb"
appAccess.DoCmd.OpenQuery "Query Name"

Open in new window

0
 
Arno KosterCommented:
Yes, this is certainly possible.

Easiest way to accomplish this is to go to the developer tab and start recording a macro. Then manually perform an update query and stop recording. You can then find the recorded macro code by opening the VBA code editor and looking in the modules section of the spreadsheet.

In the spreadsheet itself you can add an Active-X button (click on developers tab - insert - activex - button, draw the button on the worksheet). Double-click on the button to generate the appropriate event handler and fill in the name of the recorded macro.
0
 
hello_everybodyCommented:
0
 
bergsprekkenAuthor Commented:
What I meant to ask was how to start a access report from excel and use the data in excel.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.