Link to home
Start Free TrialLog in
Avatar of Gary Croxford
Gary CroxfordFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Combine values from many table rows into one string value

Thank you for looking at my question,

I have embedded an image from an Access table that I want to query so that I end up with the options as a string. I want to end up with one line showing, in this case,
GenericItem, Posn, Item, Options showing VE01, 200, 3890602089,SKD0

User generated image
Any help you can offer will be much appreciated
Avatar of A.E. Veltstra
A.E. Veltstra
Flag of United States of America image

Are you attempting to export the table contents into a CSV file? Access provides both manual and programmatic tools for that:
https://stackoverflow.com/questions/34603615/export-specific-columns-from-access-table-to-csv-using-select-into#34620228
Avatar of Dale Fye
Take a look at the article posted here

This is designed to do exactly what you are looking for.
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you are not exporting all the columns and rows of a table, then create a query that  selects the data you want and formats and sorts it if necessary.  Save the querydef.  Then use the querydef rather than the table in the TransferText method.

ALSO, if you want an export spec, you must export the query ONCE manually.  Save the export spec (press the advanced button to get to the option).  Then reference the export spec in the TransferText method.

Intellisense is your friend.  When you type DoCmd.TransferText (space) - you will get instructions on how to complete the instruction.
Avatar of Gary Croxford

ASKER

Gentlemen,

Thank you for help - sorry I took a while to respond but have been away from the office,