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

add date and time to the output to from access to excel

Status
Not open for further replies.

Panchovia

Programmer
May 6, 2010
48
CW
This is the code I use to sent a report to excel,
and I want to add date and time to the sheet .

DoCmd.OutputTo acReport, "standnew", "MicrosoftExcelBiff8(*.xls)", "C:\documents and settings\Acessdata\My documents\standnew", False, "", 0

I have also tried some other code in access 2003 none seem to work this is the only one who worked for me any excplanation

What is the meaning of the command microsoftexcelBiff8 .

Regards


 
I never can remember this one for sure, but what you need to output is something like this:

C:\MyFile.xls!WorksheetName

or

C:\MyFile.xls#WorksheetName

Something like that, but I can't seem to find a good reference at the moment. I know, b/c I've done this on many occasions, just haven't done lately..

So...

DoCmd.OutputTo acReport, "standnew", "MicrosoftExcelBiff8(*.xls)","C:\documents and settings\Accessdata\My documents\standnew.xls#WorksheetName", False, "", 0

Well, at least I know you can do it with
DoCmd.TransferSpreadsheet rather than DoCmd.OutputTo - I don't know for sure whether or not it'll work with the OutputTo command, as I've never found a reason to use it over transferspreadsheet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top