Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import An ASCII File Into Access Throughout VB 1

Status
Not open for further replies.

leassaf

Instructor
May 20, 2001
49
IL
Hi there!
Anyone knows what code should be written to import an ASCII file into Access throughout VB?
 
Well, there are several methods... it all depends on the type of data in the file and how you want it stored. Also, are you going to be using VB to do this or do you intend to use VBA in Access?

-Dustin
 
I'm about to import lotus 1-2-3 files (*.wk?). Also I'm interested in two forms of import.

1. Importing the *.wk? File so that the file is saved in a table of a name determined by the user.

2. Importing the *.wk? File so that the file's contents is appended to an already existing table.

You wrote that there are several methods of doing it depending on the type of data in the file.
Could you mention some of those methods? I might be interested in doing other forms of import in the future and would like to investigate those methods more deeply.

Thanks,

Assaf
 
Hey, I'm in a hurry right now so I can't give ya the details.. but this should get ya started. Look up the "TransferSpreadsheet" action in A2k's help.

Code:
DoCmd.TransferSpreadsheet [transfertype][, spreadsheettype], tablename, filename[, hasfieldnames][, range]

You can simply use an input box and a variable in the tablename. I haven't worked with lotus files before so I'm not too sure of the outcome. The help file mentions something about some versions only being read-only with access. I'll get back with ya in a day or two about the other methods if you would like.

I hope that gets ya started.

-Dustin
Rom 8:28
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top