Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display Muliple Row Results, in One Field 1

Status
Not open for further replies.

brooksc57

Programmer
Dec 2, 2003
4
US
I run VBA in Excel all the time to get the following result, but obviously run out of room quickly. I have yet to figure out how to do it in Access.

I've included a sample table, Combined...are the desired results, as well as the excel vb code I use

****************************
Part Region Combined
a 1
a 2
a 3 1, 2, 3
****************************

BEGG:
p = Selection.Offset(, -2)
pu = Selection.Offset(-1, -2)
m = Selection.Offset(, -1)
If p = pu Then GoTo SKIPP
ActiveCell.FormulaR1C1 = m
Selection.Offset(1).Select
If Selection.Offset(, -2) = "" Then GoTo ENDD
GoTo BEGG

SKIPP:
mu = Selection.Offset(-1)
m = mu & ", " & m
ActiveCell.FormulaR1C1 = m
Selection.Offset(-1).Select
Selection.ClearContents
Selection.Offset(2).Select
If ActiveSelection = "Quit" Then End
GoTo BEGG

ENDD:


Thanks for any help

Brooks
 
Have a look here: faq701-4233

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top