473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Q: Sorting/Grouping query results

I have a query that returns data such as:

(First row is field name, following are records)
strClass, strLastName, lngMonth, lngGrade
Biology, Douglas, 1, 90
Biology, Douglas, 2, 80
Biology, Kerk, 1, 88
Biology, Kerk, 2, 100
Math, Doe, 1, 80
Math, Doe, 2, 90
Math, Thomson, 1, 99
Math, Thomson, 2, 80

How can I get the query to return the records as:
strClass, strLastName, lngMonth=1, lngGrade, lngMonth=2,
lngGrade....etc
Biology, Douglas, 90, 80
Biology, Kerk, 88, 100
Math, Doe, 80, 90
....etc.

I've tried a cross-tab query, but can't get it to work without it
performing some sort of function (sum, count average) on the grades
data. Is the cross-tab the right idea? Or, is there a better way?

TIA!
Nov 12 '05 #1
1 1733
Stock answer. Read the following article:

http://www.mvps.org/access/modules/mdl0004.htm
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Debbie Davis | last post by:
Hi there, SQL 2000 I have the following query: SELECT sponsor, COUNT(sponsor) * 2 AS total FROM Referrals GROUP BY sponsor Works great, returns the sponsor and the total * 2 of their...
1
by: Mike MacSween | last post by:
tblProductions one to many to tblEvents tblEvents contains StartDate I want a report where the data are grouped by tblProductions.ProdID, and sorted by the earliest date in each Production. ...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
5
by: Mike | last post by:
Hello All, I have a report based upon a query. I have added a control to report footer that calcs the total cost of the inventory: =SUM(). When this total calculation is NOT on the report,...
8
by: nn0410 | last post by:
I have a report whose record source is a query. The query includes an ORDER BY clause that sorts on a particular set of columns. I would like to be able to run the same report with the same input...
3
by: Jimmy | last post by:
Is there a way to sort/group a report based on the second column of a combo box, i.e. the text associated with the primary key number?
2
by: jonosborne | last post by:
Hi, i have literally been racking my brain about this one and i think i need some help. I have a report which is produced when a button on a form is pressed. The report has many fields and records...
4
by: kstevens | last post by:
I have a report, and on the report is a min, avg, and max query each with (ok who really cares) 20 or so records. At the footer of the report i would like to have a total. I requery for each...
13
by: CD Tom | last post by:
I have a simple report that has two control sources (queries) each query has a different sort sequence. I'm using the db.querydef to change the query's sort option. When I run the report no sorting...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.