I am fumbling through some steps to automate an export from access to a csv file. I have created a macro to run a query when access opens;
[/CODE][/CODE]
All is good but the csv file that is produce has some weird formatting with all values in the first column. Also couldnt get the XL2BB add in on my excel.
My end goal is to automate this export the easiest way maybe through a task scheduler, only other issue is deleting the existing file before the new file is saved. (might be a new thread)
VBA Code:
[CODE=vba][CODE=vba]'------------------------------------------------------------
' AutoExec
'
'------------------------------------------------------------
Function AutoExec()
On Error GoTo AutoExec_Err
DoCmd.OutputTo acOutputQuery, "po_detail3", "MS-DOSText(*.txt)", "P:\Jarett\smtest1.csv", True, "", 1, acExportQualityPrint
AutoExec_Exit:
Exit Function
AutoExec_Err:
MsgBox Error$
Resume AutoExec_Exit
End Function
All is good but the csv file that is produce has some weird formatting with all values in the first column. Also couldnt get the XL2BB add in on my excel.
My end goal is to automate this export the easiest way maybe through a task scheduler, only other issue is deleting the existing file before the new file is saved. (might be a new thread)