Query criteria referring to another field

First of all, thanks. I’ve found many solutions from other posts here.

I thought the first part of this would be easy, hope I’m just doing something silly…

Building a query and I essentially want to “filter” the input for just one field by the value of another field. For the example, I’m just working in one table:

key id address default
1 111 123 W broad Y
2 222 321 N maple Y
3 222 666 S satan N

in the criteria, for a groupby of [address] I had included [tbl].[default]= 'Y' but i get error does not include the specified expression as part of an aggregate function

it looks like i should be using an expression, but i apparently have no idea what I’m doing. I want to return the address, but only if the value in [default] = y

so i’ll have an address for [key]s 1 & 2 but not three

submitted by /u/EchoHeadache
[link] [comments]