473,388 Members | 1,340 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,388 software developers and data experts.

Counting records in Access

I am a teacher and have created a database to store students marks for coursework. The table that actually stores marks is called tbl_marks and contains 3 fields (studentid, taskid and mark) I need to be able to find all students who have got 3 marks of 0. I have tried to use the Dcount function in a query but it finds all the 0 marks in the whole table.

Can anyone help PLEASE!!!!!!!!!!!!!!!!!!
Dec 21 '07 #1
2 1134
Denburt
1,356 Expert 1GB
I quoted a paragraph from the following link. If you have any questions feel free to post back. Hope this helps.
http://support.microsoft.com/kb/304361

"How to Group Records and Create Sums and Other Totals
The following steps show you how to create a totals query to retrieve summary information about orders from the Northwind sample database.
1. Start Microsoft Access.
2. Open the Northwind.mdb sample database.
3. On the View menu, point to Database Objects, and then click Queries.
4. In the Database window, double-click Create Query in Design View.
5. In the Show Table dialog box, click to select Orders, and then click Add.
6. Click Close to close the Show Table dialog box.
7. In the Orders table field list in the top half of the query design window, double-click to add the following fields: ShipCountry, Freight.
8. On the View menu, click Totals. Note that a row named Total is added to the query design grid.
9. Click in the Total row cell under the Freight column, click the arrow that appears, and then click Sum.
10. On the File menu, click Save. Type qryFreightByCountry for the name of the query.
11. On the Query menu, click Run to view the results of the query. Note that the query returns the total freight for each country in the Orders table.
Dec 21 '07 #2
jaxjagfan
254 Expert 100+
Without getting too complex with the query - this will display all students with a mark of 0 but will put the highest counts at the top.

Put together a query using tbl_marks, select studentid and select mark twice. Now from the View option from menu bar select "Totals" or click on the "Totals" icon on menu bar. By default it will display "Group By" for each column selected. Under the 1st mark column set criteria to 0. Under the 2nd mark column change the "Group By" to "Count". Under the 2nd mark column change the sort to "Descending".
Dec 21 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: mgm | last post by:
hello, I have a query that is supposed to return only 1 record, however I recently found that because of an error in the database it can return more than 1. So what I need to do is capture if it...
7
by: C White | last post by:
A little while back I had a question about counting records and my example was something like this: in my database table i have the following records john ed john rick tom
2
by: N. Graves | last post by:
I have a table with records of games played with a field for players name and another fields is a "WinorLose". One player may play several games to complete a match. I want my report to tell me...
4
by: Wayne B. Stanley | last post by:
I have a database with records dating back to the year 2001 I want to know how many of each Assembly was tested per year I have fields : TestDate AssemblyNo I am new to access but was able to...
1
by: mjobrien | last post by:
Thanks for the hint Allen (see below). But I am already doing that count as total records read (5)in the report footer. That count is unduplicated for the record not for the field - student ID as...
18
by: ChadDiesel | last post by:
I appreciate the help on this group. I know I've posted a lot here the last couple of weeks, but I was thrown into a database project at my work with very little Access experience. No other...
13
by: Regnab | last post by:
The problem I'm having is the rsa.RecordCount always returns a '1' when I know there should be about 1600 records returned. I read somewhere that one should use '.MoveLast' before recordcount but...
2
by: allyn44 | last post by:
Hello, I have built a serch form for users to edit records. I only want them to pull up the record they need, and I want to check for nulls. There should not be dupes becasue the underlying...
8
by: johnds | last post by:
This is my third question about eliminating accounting entries in a clinical database, yet retaining the valid record. Latest wrinkle is being able to sum the visits to the doctor, and the units of...
8
by: crassostrea | last post by:
Hello and Happy New Year, I have two tables in Access 2003 (Windows XP) with similar, but different, information. We’ll call them table A and table B. I want to count the number of records in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.