UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Transfertext Problem, Access 2016    
 
   
Ron38
post Sep 1 2017, 01:37 PM
Post#1



Posts: 222
Joined: 19-August 10
From: New Hampshire


The attached file contains the saved Import, my code, and the error message. The saved import works fine, but I cannot get TransferText to run
Ron
Attached File(s)
Attached File  Import_Problem.pdf ( 202.33K )Number of downloads: 3
 
Go to the top of the page
 
tina t
post Sep 1 2017, 05:39 PM
Post#2



Posts: 5,194
Joined: 11-November 10
From: SoCal, USA


hello Ron, this seems like an error that i remember reading about years ago, pertaining to older (.mdb) versions of Access. i think that an error was being generated when an import specification was being used to link at text file (rather than import it). anyway, the solution was to write a small sub to call TransferText, without specifying any arguments, and then resume next on the error. that served to make Access "see" the import specs, and then the linked file could be referenced in a query, etc.

CODE
Public Sub isActivateLink()

    On Error Resume Next
    DoCmd.TransferText

End Sub

used as

isActivateLink
CurrentDb.Execute "NameOfQueryThatUsesLinkedTable", dbFailOnError

weird solution, but it worked...and still works for me, in currently-running A97 dbs that are running on Windows7 OS. personally, i don't like to import text directly anyway, i normally link text files and then massage (if necessary) the data and dump it into the destination table using an Append query. maybe a similar solution will work for you. :)

hth
tina

--------------------
"you can't take the sky from me"
Go to the top of the page
 
Ron38
post Sep 1 2017, 06:28 PM
Post#3



Posts: 222
Joined: 19-August 10
From: New Hampshire


I never thought of linking to a text file...that's really cool!!!
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    11th December 2017 - 02:49 AM