Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Importing / Linking / June 2007

Tip: Looking for answers? Try searching our database.

Linked Table from code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ian Chappel - 28 Jun 2007 10:40 GMT
How can I change the name of a table (csv) to which I have a link, via code?

The path's always the same, but the name of the table is always the current
date, such as 20070628.csv. I don't want to have to rename this file or use
the Linked Table Manager every time. (No problem to build the filename, just
how to programmatically change the link).
Klatuu - 28 Jun 2007 14:38 GMT
I wouldn't do it that way.  I would use the TransferText method and establish
the link programatically.

   strFileName = strPath & "\" & Format(Date,"yyyymmdd") & ".csv"
   DoCmd.TransferText acLinkDelim, , "MyTableName", strFileName, True

Signature

Dave Hargis, Microsoft Access MVP

> How can I change the name of a table (csv) to which I have a link, via code?
>
> The path's always the same, but the name of the table is always the current
> date, such as 20070628.csv. I don't want to have to rename this file or use
> the Linked Table Manager every time. (No problem to build the filename, just
> how to programmatically change the link).
Ian Chappel - 29 Jun 2007 13:08 GMT
OK, all sorted, thanks

>I wouldn't do it that way.  I would use the TransferText method and
>establish
[quoted text clipped - 13 lines]
>> just
>> how to programmatically change the link).
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.