Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 6 of 6

Thread: Macro to Import csv into Access

  1. #1
    Join Date
    21st April 2005
    Location
    India
    Posts
    2

    Macro to Import csv into Access

    Hi,

    This is my problem: I need to import a text file (.csv) into Access, using a macro. Can someone help me doing this? I am conversant with Excel VBA but am quite new to Access. Is there a way to "Record Macro" in access as we do in Excel? Where can I get a comprehensive help on all Access VBA Functions?

    Thanks in advance

    Regards,
    Siva K.Balan
    Analyst - SCM

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    28th January 2003
    Location
    India
    Posts
    1,039

    Re: Macro to Import csv into Access

    Hi Siva

    Have a look at TransferText under Macros.

    or this is the code to transer csv files


    VB:
     
    DoCmd.TransferText acImportDelim, "", "Table1", "C:\Winxp\testing.csv", True, "" 
     ' where table1 is your table
    
    

    Regards


    Maqbool

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    21st April 2005
    Location
    India
    Posts
    2

    Re: Macro to Import csv into Access

    Thanx a ton Maqbool! The code worked. This is the first ever piece of code I execute in Access. Can you guide me on where I can get a comprehensive help on other Access VBA Functions? (To manipulate the table, to insert a row or delete a record, using SQL Commands, etc.). That would be really helpful to me.

    Thanx again!

    Regards,
    Siva K.Balan

    Excel Video Tutorials / Excel Dashboards Reports


  4. #4
    Join Date
    28th January 2003
    Location
    India
    Posts
    1,039

    Re: Macro to Import csv into Access

    Hi Siva:

    I think the best source is Access Help. and Microfsoft & MSDN have a lot sample codes and examples.

    Regards


    Maqbool

    Excel Video Tutorials / Excel Dashboards Reports


  5. #5
    Join Date
    19th June 2005
    Posts
    16

    Re: Macro to Import csv into Access

    Hi,

    I tried the above code but it doesn't seem to work for me.

    I have text files that have headers. And so I don't need the headers for all the text files.

    Thanks for your help.

    Excel Video Tutorials / Excel Dashboards Reports


  6. #6
    Join Date
    14th July 2006
    Posts
    2

    Re: Macro to Import csv into Access

    Is it possible to
    send a CSV file from excel to ACCESS? For example,
    look below. I just kind of getting
    involved on the whole IT side of things. I need to
    put like 400 of those type of files in Access. I
    tried to import it but all of the titles were
    everywhere.

    DMD Model 5 Prover
    Date: 6/7/2006
    Name: Duracap
    Location: Asbury Rd.
    Operator's Name or ID: 5600/6165
    Master Meter Type: 10M(10000cfh/283.2m3)
    Master Serial #: 391001
    Meter Output: Uncorrected

    Field Meter Type: T60
    Field Meter Serial #: 29
    Test Setup: routine
    Comments:
    valves ok/reg Ok/painted oiled & cleaned
    pressure = 14.60 running
    Span Test Result: PASS +/- 2.00

    Test Completed:
    Flow Rate: (acfh) Test Volume: (cf) Drive Rate or Pulses/Test: Ambient Pressure: (psia) Master Temperature: (F) Master Pressure: (inch) Master Differential: (inch) Master Volume: (cf) Meter Temperature: (F) Meter Pressure: (inch) Meter Differential: (inch) Test Duration: Upper Pass/Fail Limit: Lower Pass/Fail Limit: % Pressure Correction: % Temp. Correction: % Uncorrected Proof: % Corrected Proof: % Accuracy: % Error: Single Test Result:
    12:29:26 10004.57 1000 1000 14.308 83.347 -5.421 4.275 1028.141 80.978 0 0.002 00:06.1 2 2 -1.368 -0.436 102.527 100.684 99.321 -0.679 Pass

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Access Macro Import Spreadsheet
    By pirates22000 in forum Excel and/or Access Help
    Replies: 2
    Last Post: April 28th, 2007, 00:30
  2. Import Xls File Into Access Table With Macro
    By SerenityNetwork in forum Excel and/or Access Help
    Replies: 11
    Last Post: October 14th, 2006, 05:25
  3. import record to access table (macro in spreadsheet)
    By J88L in forum Excel and/or Access Help
    Replies: 7
    Last Post: August 27th, 2005, 00:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
porno