Solved

MS-Access Export Text File Naming Convention

Posted on 2012-04-10
3
263 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

737 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