/ Published in: Visual Basic
Runs and exports the already built query "qryRequestsTable" First command line works for xls, while second line can be used for xlsx. (ExportTimeStamp made up of predetermined strings)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
UserName = UCase(Environ("Username")) ExportTimestamp = MonthRun & DayRun & Year(Now) & HourRun & MinuteRun DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, "qryRequestsTable", "C:\Documents and Settings\" & UserName & "\Desktop\RequestsTable" & ExportTimestamp & ".xls", True DoCmd.TransferSpreadsheet acExport, , "qryRequestsTable", "C:\Documents and Settings\" & UserName & "\Desktop\RequestsTable" & ExportTimestamp & ".xlsx", True