Dim stDocName As String
Dim FileName As String
Dim XFile As String
Dim tDate As String
Dim FileDir As String
stDocName = "Commit_Export"
FileName = "Wachovia Data Export"
tDate = Format(Now(), "mm-dd-yy")
FileDir = "C:\Documents and Settings\joe\Desktop"
XFile = FileName & tDate & " .xls"
DoCmd.OpenQuery stDocName, acNormal, acEdit
DoCmd.OutputTo acOutputQuery, "Commit_Export", _
acFormatXLS, XFile, False
DoCmd.Close acQuery, "Commit_Export", acSaveNo
|