Results 1 to 6 of 6
  1. #1
    shank is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    188

    generate multi-level csv

    I need to generate a CSV file structure like below with MS Access. I assume multi-level would be a good term for this type of structure. Anyway, no clue as to how I create this for say hundreds of records daily. What is this called and where do I start?

    (...... periods represent indents for each line)
    Message Header Record1
    ......Message Detail Record1
    ............Package Detail Record1


    ......Message Detail Record2
    ............Package Detail Record2
    ............Package Detail Record3
    ......Message Detail Record3 (cancel)

    thanks!

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    you can't do it. not easily anyhow. Access is not designed for it. what is it for? what are you doing with it?

    why was the request made to you? You have alternatives, but the one to use should probably be based on what the purpose of the report it.

  3. #3
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,640
    Depends on your table structure, but one thing that comes to mind is a UNION query to get each portion, with "dummy" fields to achieve the indenting ("...." AS Spacer). You might post a sample db or something to show the data structure.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  4. #4
    shank is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2010
    Posts
    188
    We take product orders from customers who require us to confirm shipments with invoice#, tracking#, qty, etc. This was the structure they gave me if I choose to upload a CSV response. Alternative is working through a GUI which is time intensive.

    There must be some kind of program out there that does this. I'm sure it's common to them and those that have found a solution. It's just odd to me right now.

    thanks

  5. #5
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Paul's suggestion will work just fine. IMO, Excel is much better, but it's up to you. If you do not understand UNION queries and field substitution, you'll go through a learning curve but it's not much of one. good luck with it.

  6. #6
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,172
    Hi,

    The .csv format is in fact a kind of excel output without any formatting, and is opened with excel, you can compare it to a .txt file that gets opened with word. The easiest way to create this kind of file is to export the data from within access to a delimited text file, but give it the extension .csv in stead of .txt.
    But the structure you give here makes me think it is a .xml format rather than a .csv. Check this out, but exporting to a xml format is quite easy with access 2007.

    succes
    NG

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

Similar Threads

  1. generate next possible identifier
    By BayerMeister in forum Programming
    Replies: 5
    Last Post: 08-25-2010, 08:30 AM
  2. Multi Level Form
    By bkelly in forum Access
    Replies: 2
    Last Post: 08-28-2009, 11:15 AM
  3. Field Level Access
    By botts121 in forum Programming
    Replies: 0
    Last Post: 07-09-2009, 11:59 AM
  4. User level security question
    By genesis in forum Security
    Replies: 1
    Last Post: 07-08-2009, 10:10 AM
  5. Generate Image
    By dbman in forum Import/Export Data
    Replies: 0
    Last Post: 01-31-2008, 10:46 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