How do I create a button to export query results to excel

J

John J

I am working for a non-profit org and I am updating a database with some
things they would like to be able to do. I was wondering if there is a way to
create a button that would run a query and then export the results to an
excel spreadsheet. I konw how to do it manually but the people that will be
using the database aren't the most computer literate people so I was hoping
that I could just make a button and everything would just run behind the
scenes. Would I have to write code for this or could I make a macro?
 
F

fredg

I am working for a non-profit org and I am updating a database with some
things they would like to be able to do. I was wondering if there is a way to
create a button that would run a query and then export the results to an
excel spreadsheet. I konw how to do it manually but the people that will be
using the database aren't the most computer literate people so I was hoping
that I could just make a button and everything would just run behind the
scenes. Would I have to write code for this or could I make a macro?

Read VBA help on the TransferSpreadsheet method.
 
Top