Results 1 to 7 of 7
  1. #1
    David P is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2014
    Posts
    3

    Import Text File without Page Headers

    I need assistance importing a user list Text file to a single table in Access 2003 without headers. The Text file has multiple pages with headers and multiple roles per OPER ID.


    Click image for larger version. 

Name:	Capture.PNG 
Views:	19 
Size:	39.5 KB 
ID:	15662

    The table should have the fields of: OPER ID, OPR NAME, DEPT, GROUP, COST CTR, OPR INITIALS, PROFILE ID, and PROFILE DESCRIPTION. As you can see in the image, each OPER ID has multiple PROFILE IDs.

    Any suggestions would be appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Open the textfile as an object in VBA and read in each line string individually and process as appropriate.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Why are you re inputting data that has been generated/printed from some database/file?

    Can you talk to the originator of the report and get the raw data?

  4. #4
    David P is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2014
    Posts
    3
    The report is generated by an outside vendor and the only way they can provide the data is through a text file. Do you have any suggestions?

  5. #5
    David P is offline Novice
    Windows 7 64bit Access 2003
    Join Date
    Mar 2014
    Posts
    3
    Would you be willing to provide an example? I am somewhat familiar with VBA but not using it to open an object.

    Thanks

  6. #6
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Here is a reference to Vba and recordsets.

    Good luck.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. File I/O - Writing page headers.
    By Robeen in forum Access
    Replies: 13
    Last Post: 05-10-2013, 03:31 PM
  2. Import to Access from Excel File created by ASP Page
    By tssrshot in forum Import/Export Data
    Replies: 3
    Last Post: 11-29-2012, 03:52 PM
  3. import txt file with multiple headers
    By vojinb in forum Import/Export Data
    Replies: 9
    Last Post: 07-25-2011, 10:37 AM
  4. Too many page headers for one report?
    By Swilliams987 in forum Reports
    Replies: 0
    Last Post: 02-14-2011, 11:36 AM
  5. Skipping headers when Importing a text file.
    By bullwinkle55423 in forum Import/Export Data
    Replies: 1
    Last Post: 09-01-2010, 03:25 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
  •  
Other Forums: Microsoft Office Forums