Filter (1 Viewer)

EJohns

New member
Local time
Today, 15:40
Joined
Apr 12, 2024
Messages
7
Hi everyone. I am trying to filter to find the students in a certain year and term for grade and stream. Kindly assist me. Check attached database frmsearch. Thanks in advance.
 

Attachments

  • Students.zip
    68.6 KB · Views: 21

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:40
Joined
Feb 19, 2002
Messages
43,314
Create a query that joinsStudents, StreamStudents, TermStudents, YearTerms, GradeStream and add criteria for year, grade, and stream
 

plog

Banishment Pending
Local time
Today, 07:40
Joined
May 11, 2011
Messages
11,653
This can't be a coincidence:


Is this homework? Do you work with victorlindh? Are you victorlindh?

The fields/tables in the database in the thread I have linked above is 95% the same as the one you posted--including the names. Why is that?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:40
Joined
Feb 19, 2002
Messages
43,314
That video is way too complex for someone who has no concept of queries. I'm sure there are many that are simpler but here are some basic directions.

@EJohns When you are new to SQL, the easiest way to build a query is to use the QBE (Query By Example) tool.
Click on The Create tab
Then QueryDesign
The default query type will be Select. Choose each table and add it to the grid.

If you have defined relationships using the Relationship window, Access will automatically draw the join lines to connect each table. Otherwise, you will need to draw the join lines.

Here is a picture of a query from my tax database because that is what I am doing today. It only has three tables but it should be simple enough for you to follow and it is the same kind of query you need
1712952325458.png



To draw the join lines, click on the column in the left table. Hold and draw a line to the matching field on the table to the right. If the names match, Access will fill them in. If they don't, you will need to fill them in using the dialog. Draw lines to each related table. The last two tables will not join to each other but will both join to the table to the left of the next to last table.

Press the big sigma button to create the totals query. Access adds "Group By" to the "Total" line for each column. Chang them as necessary. As you can see, I have Sum, Count, and Where as well as two group by's.
 
Last edited:

EJohns

New member
Local time
Today, 15:40
Joined
Apr 12, 2024
Messages
7
That video is way to complex for someone who has no concept of queries. I'm sure there are many that are simpler but here are some basic directions.

@EJohns When you are new to SQL, the easiest way to build a query is to use the QBE (Query By Example) tool.
Click on The Create tab
Then QueryDesign
The default query type will be Select. Choose each table and add it to the grid.

If you have defined relationships using the Relationship window, Access will automatically draw the join lines to connect each table. Otherwise, you will need to draw the join lines.

Here is a picture of a query from my tax database because that is what I am doing today. It only has three tables but it should be simple enough for you to follow and it is the same kind of query you need
View attachment 113687


To draw the join lines, click on the column in the left table. Hold and draw a line to the matching field on the table to the right. If the names match, Access will fill them in. If they don't, you will need to fill them in using the dialog. Draw lines to each related table. The last two tables will not join to each other but will both join to the table to the left of the next to last table.

Press the big sigma button to create the totals query. Access adds "Group By" to the "Total" line for each column. Chang them as necessary. As you can see, I have Sum, Count, and Where as well as two group by's.
Thanks so much mum. You have been of great help in understanding the concept of ms access. You are a great teacher. May God bless you so much mum.
 
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 13:40
Joined
Sep 21, 2011
Messages
14,330
Thanks so much sir. You have been of great help in understanding the concept of ms access. You are a great teacher. May God bless you so much sir.
Pat is currently still a lady. :)
 

Users who are viewing this thread

Top Bottom