I am trying to create a text file from a table. I used the TransferText command to do this. The program was working fine when I gave it this file name (\\o2nas1\FullService_SampleData\FullSerACS.txt) but when I try to build the file name by using the letter "F", 6 digit date and .txt (\\o2nas1\FullService_SampleData\F100509.txt). I get a error "Cannot update. Database or object is read-only." I was thinking it was a bad file name but I can cretae the fie with Notepad. Is this a Assess issue?
This is the code:
FromPath = Left(InFileName, InStrRev(InFileName, "\"))
WorkDate = Format(Date, "YYMMDD")
OutFileName = FromPath & "F" & WorkDate & ".txt "
DoCmd.TransferText acExportFixed, "FullServiceUnionSpec", "FullServiceUnion", OutFileName, False
This is the code:
FromPath = Left(InFileName, InStrRev(InFileName, "\"))
WorkDate = Format(Date, "YYMMDD")
OutFileName = FromPath & "F" & WorkDate & ".txt "
DoCmd.TransferText acExportFixed, "FullServiceUnionSpec", "FullServiceUnion", OutFileName, False