Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Saving txt files to access


Message #1 by "joeseph bloggs" <joesephbloggs@h...> on Fri, 4 May 2001 19:40:15
I need to be able to save multiple txt files to an access database, sum 1 

please help!!!!!!!!!!
Message #2 by "Derrick Flores" <Derrick_Flores@s...> on Mon, 07 May 2001 08:11:42 -0500
Subject:  Re: [access] Saving txt files to access



I have a similary project that I've completed in the past.

What I needed to do is import Error logs that is generated by a production 

machine.

these Error Logs contain as much as 20k line of data.  I use Access to 

import these file

so I can perform data analysis with them. 



This code is used to locate the file any where on your computer / network

*** You Need To Add The Microsoft Common Dialog Box For This Feature ***



Private Sub cmdOpen_Click()

Me.txtStepper.Value =3D ""

dlgCommon.FileName =3D ""

dlgCommon.ShowOpen

If dlgCommon.FileName =3D "" Then

    MsgBox "You Must Specify a File Name!", vbExclamation, "File Cannot Be 

Opened!"

Else

    Me.txtFileName.Value =3D dlgCommon.FileName

   

End If

End Sub







Private Sub cmdOpen_LostFocus()

If Me.txtFileName <> "" Or Not IsNull(txtFileName) Then

        Dim a As String

        a =3D Right(txtFileName, 12)

        Dim b As String

        b =3D Left(a, 4)

        Me.txtStepper.Value =3D UCase(b)

    End If

End Sub



Once you've selected wher the source is located then you would run a 

similar code that will import the text file



DoCmd.TransferText acImportDelim, "", TargetTable, FileName, False, ""



Derrick A. Flores

Associate Systems Engineer

6" Line Engineering

Sony Electronic Inc.

Semiconductor San Antonio

1 Sony Place M/S 730

San Antonio, Texas 78245-2100

Telephone:  (xxx) xxx-xxxx

Fax:  (xxx) xxx-xxxx

Pager:  (xxx) xxx-xxxx

E-mail: derrick_flores@s...



>>> "joeseph bloggs" <joesephbloggs@h...> 05/04 7:40 PM >>>

I need to be able to save multiple txt files to an access database, sum 

1

please help!!!!!!!!!!




  Return to Index