Solved

importing non txt files

Posted on 2004-04-28
10
450 Views
Last Modified: 2012-06-27
hello

I have *.unl files.
I want to import them lile txt files. how can I do?
0
Comment
Question by:yesilkalem
  • 5
  • 4
10 Comments
 
LVL 65

Expert Comment

by:rockiroads
ID: 10936911
what is a unl file, is it txt format?

why not rename it?

e.g.

dim sOldFile as String
dim sNewFile as string

sOldFile = "test1.unl"
sNewFile = Replace(sOldFIle,".unl",".txt")

DoCmd.TransferText acImportDelim,,"tablename",sNewFile

if it is delimited, if fixed then you use acImportFixed
0
 
LVL 34

Expert Comment

by:flavo
ID: 10936913
Short answer, dont really really think you can.. here;s a work around

sub import()

Name "c:\something.unl" as "c:\something.txt"

Docmd.TransferText acImportFixed, "mySpec", "tblMyTable", "c:\something.txt"


Name "c:\something.txt"  as "c:\something.unl"

Dave
0
 
LVL 34

Expert Comment

by:flavo
ID: 10936916
To quick rocki!
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 10936919
Hi Dave, hows it going
0
 
LVL 34

Expert Comment

by:flavo
ID: 10936973
Got an exam tomorrow, should be studying.. This place is too adictive....
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 65

Expert Comment

by:rockiroads
ID: 10937047
tell me about it, im being in my work
deadline is friday, Ive got heaps to do!
0
 
LVL 34

Expert Comment

by:flavo
ID: 10937062
Ive gotta go.. really need to do at least a little..

Cheers!
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 10937100
good luck with exam!!!
0
 

Author Comment

by:yesilkalem
ID: 10937270
thank you flavo
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 50 total points
ID: 10937392
actually I forgot one line, but dont worry about it, looks like u got it sorted

after sNewFile = Replace(sOldFIle,".unl",".txt")
you do FileCopy sOldFile, sNewFile


0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now