Avatar of developingprogrammer
developingprogrammer
 asked on

cannot change linked text file path

hi guys,

i've a linked textfile in my database and i'm trying to change this link path to the new text files that are generated every day.

here is my database and the 2 text files attached.

i have some code for this but when it wasn't working, i tried reducing everything back to basics - e.g. not using code by relinking the text file by hand.

when i tried to relink the text file by going to the link manager, i realised even though i chose the other text file i could not relink it.

question --> 1) can linked text files have their paths changed?
2) how can i do this in code? e.g. if i can't just simply change the path, how can i create a linked text file through vba?

thanks guys!
TextFileLInking.zip
Microsoft Access

Avatar of undefined
Last Comment
developingprogrammer

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Gustav Brock

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
developingprogrammer

ASKER
Whao gustav!! I would have never figured that out in a million years!!

the short name probably also explains the error 3011 that arises when I have multiple .s in my file name when I use transfertexf. What fantastic gustav, thanks so much for your help = )
Gustav Brock

You are welcome!

/gustav
SOLUTION
Jim Dettman (EE MVE)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
developingprogrammer

ASKER
hey gustav i read up a bit on the 8.3 short file name on wiki and that's really cool. i'm not sure how i would ever come across this 8.3 short file name if you didn't mention it ha. haven't had time to go through the whole thing but really interesting and helpful. thanks once again!! = ))

thanks for your help Jim! in the end i resorted to the DoCmd.TransferText function cause i think linking to a textfile is less stable than importing it in - as in one fixed state to another fixed state. something like deterministic state. DFSM i think it's called - not sure if i'm using it correctly though ha. but thanks for your sharing!! = ))
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23