WHERE clause confusion

NewShoes

Registered User.
Local time
Today, 09:23
Joined
Aug 1, 2009
Messages
223
Hey all,

I'm currently learning Access and have created a little bit confusion for myself!

Basically, when creating a query to find every person in my database with a surname of "Smith", I would put this in the criteria field. This works great. However, if you turn totals on, you get the WHERE option. What difference does this make? ...As I see it, they both are just selecting whatever is in the critera box?

Many thanks,
-NS
 
What version of Access are you using? I'm using 2003 and it doesn't work as you describe.

A SELECT query without criteria will simply list a series of field values. When you add a criteria value, that creates a "WHERE" clause in the query. The Totals does not add the "WHERE".

Take a look at the SQL for the query and you will see the effect of criteria and Totals.

Good luck.
 
Thanks for the reply. I am using Access 2007.

What I mean is, when you turn totals on in the QBE screen, you get a new row called "Total" just beneath the "Table" row. In this "Total" row, you can select things from the dropdown menu for example, Sum, Count etc. One of the options in WHERE.

I was just wondering what this option does, as I thought (as you have pointed out) that the "Criteria" row puts a WHERE in the actual SQL code.

Hope that makes sense!

-NS
 

Users who are viewing this thread

Back
Top Bottom