Results 1 to 3 of 3
  1. #1
    nicoboss is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Sep 2017
    Location
    http://www.webagency321.com
    Posts
    72

    Question update needed in a macro

    Hi,



    I use an access file to upload csv files.
    Here is the app : https://www.accessforums.net/attachm...0&d=1529335018
    I have attached one example of csv file it uploads. csvexample.zip

    I would like to update this application.

    The general concept remains the same but instead of creating 1 mdb destination file, I would like the app to create 10 different mdb destination files and dispatch the lines from the csv depending on the content of the line.

    So the access application should :
    1. create 10 smaller files with the same name as the original csv file and the suffix "-1", "-2", "-3", "-4", ... "-10" at the end. If one of these small files already exist in the folder, the data should be added into this already existing file.
    2. depending on the 8 first characters (generally composed of 2 letters, 1 space, 2 letters, 1 space, 2 letters) of the 1st field, each line should be dispatch into 1 of these 10 smaller files. I provide the table of correspondance (https://www.accessforums.net/attachm...9&d=1530105590) which relates every sequence of 8 characters with the small file number. One specific line whose ID field contain "Flop_Tur" should be added to all 10 small files, except if this line is already in the small file in order to avoid duplicates.

    Thank you for helping me !

    Nico

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,931
    Modify code to use conditional statements. Use If Then Else or Select Case structures.
    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
    nicoboss is offline Advanced Beginner
    Windows 10 Access 2007
    Join Date
    Sep 2017
    Location
    http://www.webagency321.com
    Posts
    72
    Quote Originally Posted by June7 View Post
    Modify code to use conditional statements. Use If Then Else or Select Case structures.
    Hi June7,

    Sorry, I don't know coding so I don't know how to do that.

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

Similar Threads

  1. Replies: 7
    Last Post: 01-20-2017, 02:21 PM
  2. Printing macro help needed.
    By UnclearMist in forum Macros
    Replies: 1
    Last Post: 08-03-2014, 02:11 PM
  3. Help needed for SQL string - UPDATE
    By DADAZHU in forum Programming
    Replies: 1
    Last Post: 12-15-2011, 03:36 AM
  4. Replies: 11
    Last Post: 11-07-2011, 11:29 AM
  5. Replies: 0
    Last Post: 01-01-2007, 02:26 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