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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export query to excel... format and overwrite problems!

Status
Not open for further replies.

misscrf

Technical User
Jun 7, 2004
1,344
US
We have an sql table linked into access, and a query off that table. I have a basic form with 1 button. We will eventually grow from this, but this button is our first task.

I am trying to use the command button to export the query to an excel sheet.

The query has parameters that it asks for when run. Start date and end date, this is no big deal.

I have tried the DoCmd.transferspreadsheet but I am getting errors. It keeps saying that the excel spreadsheet is not in the expected format. I am running xp ( 2002)

Before, when this was working, It was good except that if I ran it more than once, it didnt overwrite the data. If I put 2/1/04 for the start, and 8/1/04 for the end, I got that.

But if I changed the end date to 5/2/04, it still showed dates up to 8/1/04.

Can anyone please help?

Thanks


misscrf

Management is doing things right, leadership is doing the right things
 
why is no one answering my question? no one loves me!
:-(

[cry]

misscrf

Management is doing things right, leadership is doing the right things
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top