Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

importing non txt files

Posted on 2004-04-28
10
471 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
Back Up Your Microsoft Windows Server®

Back up 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: 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
 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
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 views 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 Microsoft Access…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

837 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