Solved

MS-Access Export Text File Naming Convention

Posted on 2012-04-10
3
268 Views
Last Modified: 2012-04-17
Hi,

I'm not sure how difficult this is...but any help would be greatly appreciated. I have a table that I want to export into seperate files based on the data.  For example:

Table X has the following fields:

Name (John Smith, Joanne Smithers, Jordan Simpson)
ItemCategory (Shirt, Shoes, Socks)
OrderDate (04/10/2012, 04/12/2012, 04/15/2012)
RecurringOrder (monthly, weekly, yearly)

I want to create seperate CSV files based on the ItemCategory, OrderDate, and RecurringOrder.

Socks_4-10-2012_weekly.csv
Shirt_4-12-2012_monthly.csv
Shoes_4-15-2012_yearly.csv

So, when someone imports the Socks_4-10-2012_weekly.csv - they'll be getting all the records in the table that are for Socks that were ordered on 4-10-2012 and has a recurringOrder of weekly.

How can I export these .csv files from the same table source?

Thank you,
0
Comment
Question by:mds_1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37830176
create a query using those criteria

select * from tableX
where itemcategory="socks" and OrderDate=#4/10/2012# and RecurringOrder="weekly"


you can use a form with three combo boxes, for itemCategory, OrderDate, and recurringorder

so the query criteria will be based upon the selections in the combo boxes.. like this

select * from tableX
where itemcategory=Forms!YourFormName!comboCategory and OrderDate=Forms!YourFormName!comboOrderDate and RecurringOrder=Forms!YourFormName!comboRecurringOrder


save the query as "myQuery", then export as .csv file
0
 
LVL 21

Accepted Solution

by:
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP earned 500 total points
ID: 37830178
I would create separate queries to select the desired data for each export.
0
 

Author Closing Comment

by:mds_1
ID: 37857019
thank you - i ended up creating multiple queries to get it to export correctly.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question