I need to export a file through VBA, but as part of the file name is to include a Date/Time stamp in brackets.
Here's what I have:
and the Export Code:
When I run it, I get the following error:
Run-time Error:'3125'"
'0010520[082620101131].csv' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
Any help would be much appreciated.
Thanks in advance.
Jeff
Here's what I have:
Code:
strExportFileName = "C:\My Documents\" & strPositivePayFileName & "[" & Format(Date, "mmdd") & Format(Time, "hhnn") & "].csv"
Code:
DoCmd.TransferText acExportDelim, "Positive Pay Export Specification", "qryPositivePayExport", strPositivePayExportFileName, True
Run-time Error:'3125'"
'0010520[082620101131].csv' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
Any help would be much appreciated.
Thanks in advance.
Jeff
Comment