Results 1 to 3 of 3
  1. #1
    Lounger
    Join Date
    Aug 2006
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Export based on criteria (Access XP)

    I am trying to find a way to export a query into separate files. For example, I want to create a different file for each type of fruit:

    Apple (Green) $1.00
    Apple (Red) $1.10
    Banana (Sugar) $2.00
    Pear $1.00

    I want one output to be "Apple.txt", one to be "Banana.txt" and one to be "Pear.txt".

    Is there a way to export the query into separate output files based on the type of fruit? I have 48 different types of fruit, and 30,000 records.

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Export based on criteria (Access XP)

    I would tend to have a text box on a form that is to be used as the filter as well as part of the filename. I would then use the DoCmd.OutputTo command to output the file.

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Export based on criteria (Access XP)

    If you want it to be automated, you'll have to indicate very precisely and exactly how to separate the records. Is the first 'word' always the identifier, without exceptions?

Posting Permissions

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