Outputing query results into excel

D

David

How do I develop a way so that when a user clicks on a
button on a database it runs a query, and then puts the
results into an excel spreadsheet. I can do these things
individually...click to run a query, click to open excel
and enter data, but I don't know how to put query
results into excel and format the spreadsheet.

Also can anybody recommend a good book that deals with
this kind of stuff - most books I have seen are either
too advanced or too simple.

can anybody help....I'm fairly new to VBA and don't
understand most developers answers!
 
V

Van T. Dinh

You can use the TransferSpreadsheet Method to create an Excel spreadsheet
using the Query as the data Source.

Check Access VB Help on TransferSpreadsheet Method.

Books: go to a well-stocked bookshop and browse around for books that suit
you.

The book "Beginning Access {YourVersion} VBA" by Smith & Sussman seems to
aim at VBA learners but fairly comprehensive so if you learn this book, you
will know a lot more and then you can go for advanced books like Access
Developer's Handbook.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top