T
Tony Williams
I have a database that has daily imports from a text file. I import them into
a temporary table to do some cleaning up then use the remaining data to
update and append records to my main table. However I want to save the
temporary table each day and have used this code behind a command button
Private Sub cmdsave_Click()
On Error GoTo Err_cmdsave_Click
DoCmd.TransferText acExportDelim, "VDATA Export Specification", "VDATA",
"C:/TempData/tempdata.txt"
Exit_cmdsave_Click:
Exit Sub
Err_cmdsave_Click:
MsgBox Err.Description
Resume Exit_cmdsave_Click
However this will mean that each time I save the data it will overwrite the
current file bevcause the file location is coded. Is there a way of using
this code to prompt for a file name each time I save the file so that I can
add say the date?
Thanks
Tony
a temporary table to do some cleaning up then use the remaining data to
update and append records to my main table. However I want to save the
temporary table each day and have used this code behind a command button
Private Sub cmdsave_Click()
On Error GoTo Err_cmdsave_Click
DoCmd.TransferText acExportDelim, "VDATA Export Specification", "VDATA",
"C:/TempData/tempdata.txt"
Exit_cmdsave_Click:
Exit Sub
Err_cmdsave_Click:
MsgBox Err.Description
Resume Exit_cmdsave_Click
However this will mean that each time I save the data it will overwrite the
current file bevcause the file location is coded. Is there a way of using
this code to prompt for a file name each time I save the file so that I can
add say the date?
Thanks
Tony