troubleshooting Question

Access macro / vba code transfertext not over writing files.

Avatar of avoorheis
avoorheis asked on
Microsoft AccessWindows Networking
2 Comments1 Solution555 ViewsLast Modified:
I have set up several macros and some vba routines that use the transfer text or transfer spreadsheet commands to create files on various network folders. These routines, I thought, would just overwrite the existing files. In fact, I've tested each one several times to make sure (like changing the data, run the routine and then making sure the data had been updated).

I happened to review one of the files and found that the data had not been updated, even though the timestamp of the file showed that it had been modified that day. When I found this, I deleted the file and re-ran the code, which created the file with the correct data. I even ran my test again where I modified the data in the file and re-ran the code to make sure the data was updated and it was.

The only thing I can figure is that if someone else opens the file and saves it, something happens to the permission and access won't actually overwrite the data, even though the modified date was changed and Access did not report any problem.

Since I've found this, I've implemented changes that will just delete the existing file before updating (so, just creating a new file each time).

My actual question is can someone confirm what I believe is happening or have a different explanation?

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros