We help IT Professionals succeed at work.

Combine values from many table rows into one string value

79 Views
1 Endorsement
Last Modified: 2018-11-14
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

BOMMatrix Table
Any help you can offer will be much appreciated
Comment
Watch Question

A.E. VeltstraSr. Software Architect

Commented:
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
Dale FyeOwner, Dev-Soln LLC
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2010

Commented:
Take a look at the article posted here

This is designed to do exactly what you are looking for.
CERTIFIED EXPERT
Most Valuable Expert 2015
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
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.
Gary CroxfordOperations Support Analyst

Author

Commented:
Gentlemen,

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