hi there
anybody here who knows how to start and control the import text wizzard in ms access2000?
or any other way how to import data from a text file into a table
thanx
Do you want to start it from within VB? If not open ACCESS, go to the File menu, > Get External Data > Import. If you want to open the file from within vb then access the table,this should get you started:
Dim cnConn as adodb.connection
dim sLine as String
Dim iFileNum as integer
Dim sSQL as string
dim vOne,vTwo,vThree as string
set cnConn = createobject("ADOdb.connection"
iFileNum = Freefile
Open "C:\yourfilepath" For Input As #iFileNum
Do Until EOF(iFileHeader)
Line Input #iFilenum, sLine
'set the variables to your file structure
vOne = Mid$(slIne,2,4)
'vtwo = something
'vthree = something
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.