Transfer Text Method by each change in column

S

simplymidori

Is there a way to export my data by using transfertextmethod or by other
means... on each change in the field.

Column A
apple
apple
apple
banana
banana
misc fruit
misc fruit

So, I would like to export this data into 3 tabs in a workbook.
apple,banana, misc fruit

Thanks in advance.
 
J

Jeanette Cunningham

Hi,
if you want the data in an excel workbook, check out Transfer Spreadsheet,
use vba help.

Jeanette Cunningham
 
S

simplymidori

Jeanette I searched what you recommended me eariler and I am currently using
the same method when exporting an entire query.
I
s there a way to export into multiple worksheets from 1 query based new
category in a column?

DoCmd.TransferSpreadsheet Export,acSpreadsheetTypeExcel9 , "YourTableName",
"C:\YourOutputLocation.xls", True
 
F

frank knuckles

simplymidori said:
Jeanette I searched what you recommended me eariler and I am currently
using
the same method when exporting an entire query.
I
s there a way to export into multiple worksheets from 1 query based new
category in a column?

DoCmd.TransferSpreadsheet Export,acSpreadsheetTypeExcel9 ,
"YourTableName",
"C:\YourOutputLocation.xls", True

For this purpose I always use for instance:

DoCmd.TransferSpreadsheet acExport, 8, "YourQueryName1","YourFileName.xls",
True, ""
DoCmd.TransferSpreadsheet acExport, 8, "YourQueryName2","YourFileName.xls",
True, ""

It will create YourFileName.xls (if it's not already there) and it will
generate 2 worksheets with the content of YourQuery1 and YourQuery2
respectively.

In your case you need 3 different queries as you have to tell Access which
data you want in which worksheet.

FK
 
S

simplymidori

Thank you to you both. Creating new queries will take quite a bit of
maintenance on my end. I figured out a way to break out each product by
category using a macro. Thanks again for both of your suggestions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top