Asatoma Sadgamaya
asked on
DoCmd.TransferSpreadsheet acExport 10
Hi,
I am trying to transfer data using below query. many columns in the below query have got dates in date format. When I transfer below query, I am getting attached message window. how can I stop this window from popping up? Also, I created a table using below given query (QryReportDetailMkQry) and replace the query name with table name in blow script. The script does not output the dataset into the Reports.xlsx
Public Sub Export()
ilDatCretd = FileDateTime("path"
DoCmd.TransferSpreadsheet acExport, 10, "QryReportDetailQry", "C:\NtRp\Reports\Reports.x lsx", True, "RprtDtl" & "." & Format(FilDatCretd, "ddmmyy hhmm")
End Sub
Thanks
K
Error.jpg
I am trying to transfer data using below query. many columns in the below query have got dates in date format. When I transfer below query, I am getting attached message window. how can I stop this window from popping up? Also, I created a table using below given query (QryReportDetailMkQry) and replace the query name with table name in blow script. The script does not output the dataset into the Reports.xlsx
Public Sub Export()
ilDatCretd = FileDateTime("path"
DoCmd.TransferSpreadsheet acExport, 10, "QryReportDetailQry", "C:\NtRp\Reports\Reports.x
End Sub
Thanks
K
Error.jpg
You get that error on an EXPORT process? You generally see errors like that on an Import.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks ScriptAddict,
I like your docmd.setwarnings false. that worked for me. Basically the query i need to transfer has got lots of function on each column because of this function it shows #Error on the query wherever there is no values. but when I transfer this query data set into excel, i can't find any #Error on it. Only problem was vba throws warning message.
Cheers
I like your docmd.setwarnings false. that worked for me. Basically the query i need to transfer has got lots of function on each column because of this function it shows #Error on the query wherever there is no values. but when I transfer this query data set into excel, i can't find any #Error on it. Only problem was vba throws warning message.
Cheers