Results 1 to 20 of 80

Thread: How to import a text file with more than 255 fields into Access

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #36
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,297
    Location
    500 records will be fine.
    You will have to change the line of code that sets the key field string (fieldcount = 25) to reflect the number of the key field in the second table and then add the string to the first table key field after processing the second table.
    So you would need to move line

    .Fields(63) = keyfield 'set primary key in tblImport2
    to after the table 2 processing with this code

    With rst ' process first table
        .AddNew 
        .Fields(whatever the key field is in table 1) = keyfield 'set primary key in tblImport1
        .Update 
                End With
    Last edited by Aussiebear; 12-28-2024 at 08:20 PM.

Posting Permissions

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