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...
arnel_gp
Jul 14, 2022Iron Contributor
can you fully qualify the text filename with the Correct Path, eg:
C:\theFolder\Scan2.txt
C:\theFolder\Scan2.txt
JAZ_OV
Jul 14, 2022Copper Contributor
I've tried that with the same results. The only thing that throws the error is using a saved specification. Thanks for the suggestion.
- JAZ_OVJul 14, 2022Copper ContributorOops, Edit to previous post - won't do anything without the RunSQL :
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) & ");"
DoCmd.RunSQL vsql
Wend
Close #1- DiegomarinoJul 16, 2022Copper Contributorhi, i got the same problem. So the only workaround is to read the file and add values row per row, right?
i'm not a great programmer, i'm wondering if they will solve the issue soon, i mean if there is some official communication- JAZ_OVJul 18, 2022Copper Contributor
Yes, unfortunately that's the only way right now to accomplish this. In my case, I don't have a lot of fields to import so it's workable and preferable (the saved import was legacy). I have made Microsoft aware of this and I hope they will rectify it. Not sure if it's in Windows or Office. My users have Windows 10, I have Windows 11 and it was broken on both. I use Office 365.
However, if you look at my code sample, it should not be too hard for you to reuse. I can give you tips if you need help and want to share your file format.