import data to Access table thru VBA

krishnarao

Registered User.
Local time
Today, 20:59
Joined
Jun 11, 2007
Messages
12
I want to import data from *.txt file to a table in access. i want to accomplish this through VBA not by wizard.

Advance Thanks for any suggestions and solution
:mad:
 
There are lots of ways to do this in code. The simplest is DoCmd.TransferText. Look that one up in Access Help. It's not super-flexible, but you didn't really describe anything in detail, so it may very well suit your needs just fine.
 
no idea Ken....

krish.. i gues syou want to use something like

Code:
[COLOR="Lime"]docmd.TransferText[/COLOR] acImportFixed/acImportDelim,,"table to which to import to","Text file to import", "Has it a title row?"

The green is code, you change the rest accordingly./..Hook it all up to a button and should work..and no more mad faces..it scares Ken
 
bob, just looked at your tut on spec..could you then use the saved spec in the parameter field for the transfertext?
 
Import Excel table into access table

I need to create a command button in an Access form and build VBA code to make the button import a column of data from an Excel file into a table in access.

Could someone please give me an example or tell me the code to do this?
 

Users who are viewing this thread

Back
Top Bottom