Create a link to a csv file

User avatar
Abraxus
3StarLounger
Posts: 219
Joined: 01 Mar 2010, 17:34
Location: Blue Springs, MO

Create a link to a csv file

Post by Abraxus »

I have a .csv file I need to link to to get info each day. The file will be time/date stamped so the name changes each day.

My solution is to link to the file each day, import the data, then delete the link.

What I can't figure out is how to do the link...

I'm trying this:

Code: Select all

DoCmd.TransferText acLink, , "tblTempComments", CurrentDBDir & "Unclassified\" & strDateToUse & "-Unclassified.csv", True
but I keep getting an error:
3011 - Access can't find the obect tblTempComments

I'm sure it's a simple syntax misstep, but I can't figure it out.

Also, for some strange reason the file deletes after each attempt to run the code.

Any suggestions? The path to the file is correct....I've triple checked.

Thanks!
Morgan

User avatar
Abraxus
3StarLounger
Posts: 219
Joined: 01 Mar 2010, 17:34
Location: Blue Springs, MO

Re: Create a link to a csv file

Post by Abraxus »

Seriously I take 10 minutes putting this post together then 2 minutes after posting stumble across the answer. :-)

I replaced acLink with acLinkDelim and voila! It works!!
Morgan

User avatar
HansV
Administrator
Posts: 69449
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Create a link to a csv file

Post by HansV »

:thumbup:
Regards,
Hans