Excel report dump

N

Nick

Does anyone know a way to give the user the option of letting a user launch
a query and have it dump into an excel spreadsheet all with the push of one
button from a form? The way I have it set up right now is the user actually
launches the query from the form, enters date criteria, and the query
displays the reports in Access format, from which they have to dump to
Excel. I would really rather them not see the Access data at all.

Thanks. Any help with this issue would be greatly appreciated.

Nick
 
P

PC Datasheet

Nick,

Lookup the TransferSpreadsheet function in Help. Use a pop-up form called
PFrmDateCriteria to enter your date criteria. Here's a skelton of what you
need ---

Put code like this in the OnClick event of a button:

DoCmd.OpenForm "PFrmDateCriteria",,,,,acDialog
DoCmd.transferSpreadsheet............
DoCmd.Close acForm, "PFrmDateCriteria"

On PFrmDateCriteria, put this code either in the AfterUpdate event of the date
field or iin the OnClick event of an OK button:

Me.Visible = False


--
PC Datasheet
A Resource for Access, Excel and Word Applications
(e-mail address removed)
www.pcdatasheet.com

· Design and basic development for new applications
· Additions, Modifications and "Fixes" for existing applications
· Mentoring for do-it-yourselfers who want guidance
· Complete application design and development
· Applications Using Palm Pilot To Collect Data And
Synchronize The Data Back To Access Or Excel
 

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