Matt Olson
asked on
MS-Access Export Text File Naming Convention
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.cs v
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,
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.cs
Shoes_4-15-2012_yearly.csv
So, when someone imports the Socks_4-10-2012_weekly.csv
How can I export these .csv files from the same table source?
Thank you,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you - i ended up creating multiple queries to get it to export correctly.
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!YourFor
save the query as "myQuery", then export as .csv file