Question Locked

Problem exporting tables to text file and save it with the current date!

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I am trying to append the current date to the txt file I am saving with docmd acExportDelim command so I can review it later if deen necessary. My sub is inlucded below. If I dont' include the date, the file is getting stored, but when I include the date its highlighting my command. Any help will greatly appreciate.

Private Sub Command0_Click()

DoCmd.TransferText acExportDelim, "","Employees","C:\Users\shari\Desktop\exemployee" &date & ".txt", False"

End Sub

3 replies

by tony hopkinson

& exspects a string.

& Format("yyyyMMdd",date) & ".txt"

might go a bit better.

This discussion is closed to new replies.