Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a query, run in acces, in Excell 5

Status
Not open for further replies.

Rmck87

Programmer
Jul 14, 2003
182
US
Ok, i have a form that on the users selections runs and creates a query. Then it saves it. Then what i want to be able to do. Is when the user opens Excell he/she should be able to open the Query that was saved before in access. If anyone knows how to do this please let me know. Or if i am in the wrong im sorry, and please direct me to a better forum for this question. Thanks in advance!

-Ryan

One Ring to Rule Them All, One Ring to Find Them, One Ring to Bring Them All, and in the Darkness Bind Them.
 
xlbo: is there a refrence table that contains the code 'OpenDatabase' ? Because it seems to be saying that there is no 'OpenDatabase' Function.

Note: I got the macros running, I just had to set the security level to low in order for them to work.

One Ring to Rule Them All, One Ring to Find Them, One Ring to Bring Them All, and in the Darkness Bind Them.
 
One other dirty way,... but it will work for you,...

turn on the Macro recorder,...follow the steps outlined above to link to any of the variety of queries that are in your db. then when you return the data...stop the recorder.

then alt+f11 to view the code that was recorded...you can then splice a variable into the string so that users can enter the query name via an inputbox.
 
rmck - my post on 1st august has all the code you would need to complete the task. It is tested and somehting I use to allow users to access a buch of queries I have set up in a database. The references I mentioned should be all you need to run it. As to why it won't allow macros - you must have your macro security set to high. Depending on version, it'll be in the Tools>Options area to tuen it back down

Rgds, Geoff
Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?
Want the best answers to your questions ? faq222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top