Solved

Help with previous question...getting table data into one line...group by

Posted on 2014-12-09
4
137 Views
Last Modified: 2014-12-09
Hi

I originally posted a question that Jeffrey Coachman supplied some code that worked great...thanks Jeff.  

How can I get multiple records displayed in one line

After running some tests, I am now wanting to do some grouping.  For example the returned data is:

W~AP 280 GNC~AP 280 Qu~AS 266 GNC~AUH2 283 ADM~B 465 AGE~BA 278 Qu~BU1 293 ADM~CO 293 ADM~F1 254

I am wanting the AP 280 to be grouped together so it displays like:

W~AP 280 GNC Qu~AS 266 GNC~AUH2 283 ADM etc etc.

This will be the same for any of the same letters after the ~ with the same number.

I hope I have explained this okay....if not please let me know and I shall try to clarify.

Thanks

Ajae
0
Comment
Question by:ajaeclarke
  • 2
4 Comments
 
LVL 33

Assisted Solution

by:Mike Eghtebas
Mike Eghtebas earned 250 total points
ID: 40488406
You need to group by first and then use jeff's solution at:

change:
Set rst = CurrentDb.OpenRecordset("YourTable")

to:
Set rst = CurrentDb.OpenRecordset("Select PDCode, PDData From YourTable Group By PDCode, PDData Order By PDCode, PDData")
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 250 total points
ID: 40488874
test this revised db from previous thread
db5.mdb
0
 
LVL 1

Author Comment

by:ajaeclarke
ID: 40490485
Thanks for the comments....both worked great and I have it working now :-)  You guys are great!

I have another questions about a field that I want displayed in a certain way...should I accept these solutions and start another question?
0
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 40490494
post a new question for another problem
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now