Forum Discussion
JAZ_OV
Jul 14, 2022Copper Contributor
Windows or Office 365 Updates on 7/12/22 Introduced Error with TransferText in vba for Access
After the above noted updates I have received several reports of Access error 3125. I have traced this issue to a saved import specification. Below is an example of the error when using an import s...
George_Hepworth
Jul 14, 2022Silver Contributor
There have been other reports of bugs introduced in the most recent Windows Update, primarily associated with Security issues. This, being an automation procedure, might be related. I don't know any more details yet, though. One thing I'd verify, though, is that the folder where you are trying to export the file is designated as a Trusted Location for Office. Also, fully qualifying the path, as Arnel already suggested, is always a good idea.
- JAZ_OVJul 14, 2022Copper ContributorFrom three more hours of diagnostics, the TransferText feature is well and truly broken so if you have those in your apps you may want to check to see if they are functioning
My findings are that if you have a static file location (any name, any path) and do a manual import to the destination table, the TransferText feature will then work. And, that has to be done on each individual user's copy of the application and should the file location change, it's busted again. For obvious reasons, this is not a workable solution. My work-around is to never use TransferText and read records in from the text file (my app lets the user choose the file location):
Open CurDir & "\Scan.txt" For Input As #1
'Get a record
While Not EOF(1)
Input #1, vID, vRec
vsql = "INSERT INTO RetestResponses(StudentID, Responses) VALUES (" & CStr(vID) & Chr(44) & Chr(34) & vRec & Chr(34) & ");"
Wend
Close #1