Import a text file to acces using VB

  • Thread starter Lily72 via AccessMonster.com
  • Start date
L

Lily72 via AccessMonster.com

Hi,
I really need help, i am not familiar with VB. I have a text file with
headers, here is an example
Header:
Agent ID ACD bcd Calls Avg work Hours Avg Calls per Hous Avg after call
Misc Avg Time
Staff Acd ACW AUx Misc acd misc
Columns:
John, Smith 236 66 396 7 288 256 05:27 04:33 00:07 00:16 00:32 00:08 10
Karmen, shae Kendra 657 63 386 10 425 145 06:27 02:36 00:09 00:19 00:36 00:08
10

I would only like to import everything from the rite onwards excluding the
name. How can i tell it to loop through each line and pull the specific
records that I want. Any help i would appreciate it.

Thank you
 
J

John Nurick

Hi Lily,

I presume that you're working with Access and mean VBA rather than VB.
If you're writing a Visual Basic application, ask in an appropriate
forum.

In Access, import the file once using the text import wizard (File|Get
External Data|Import). As you do so, click the Advanced button in the
wizard, and save your settings - including ones such as skipping the
first fields - as an import specification.

Subsequently, use the VBA statement DoCmd.TransferText to import the
file, passing it the name of the import specification.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top