Calling query in access from excel

gaju_3112

Registered User.
Local time
Tomorrow, 02:10
Joined
Nov 4, 2007
Messages
38
I have some queries in access. I have putted the button control from controls toolbar in another excel sheet. I want to do following_
Whenever I click the button on excel sheet, the query in access dabase should get fired and result should be put in same or different excel sheet.

Please help!
 
In access VBA, I usually use docmd.transfertext or docmd.transferspreadsheet to accomplish this. I run this from access rather than from excel, but using VBA I think you should be able to run it from excel.

I´ve always done it the other way around so I haven´t tried it, but make sure you have a reference to msaccess library in excel VBA. This way you can create object containing the access application, the db and whatever you need to have.

Is there a reason why you don´t do it in access?

Fuga.
 
What is the query ?
SQL ?
And the location and name of the mdb ?
Is the mdb protected ?
 

Users who are viewing this thread

Back
Top Bottom