Results 1 to 3 of 3
  1. #1
    hklein is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    15

    partial import with transfertext

    Hello, I am quite new to access programming, I need now to post my first question. I have to import a text file, which has a structure like this: Id;systemname;username;Name The database contains persons usernames in different systems, if a person have access to both systems, than his name is listed twice, like this Id;HR;username;John Smith Id;Finance;username;John Smith What I need to know is, that after the import, I have a table, in which only those records are stored, where the system is HR. What is the right way of doing this? how do I extend this small code?
    Code:
     DoCmd.TransferText acLinkDelim, "specification", "tblUsers", "c:\export\users.txt"
    Many thanks

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You only want to import the lines that are HR coded?

    Then can't use the TransferText method. Or else remove the lines from table after they are imported. Use a DELETE sql action.
    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
    hklein is offline Novice
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    15
    Thank you, I did it on this way.

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

Similar Threads

  1. Import Partial Excel File into Database
    By AndrogynyRocks in forum Access
    Replies: 3
    Last Post: 04-13-2012, 02:31 PM
  2. use vbs and TransferText cmd to import csv
    By conway in forum Import/Export Data
    Replies: 1
    Last Post: 02-03-2012, 08:38 PM
  3. TransferText
    By za20001 in forum Import/Export Data
    Replies: 1
    Last Post: 01-03-2012, 11:57 AM
  4. TransferText problem
    By rossib in forum Import/Export Data
    Replies: 1
    Last Post: 12-17-2009, 04:57 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