Hi. I am very new at Access.
I have two tables:
1) MasterTable, with standardize students names and address with a ID number.
2) LunchTable, a table that indicates what every student (w/ ID number) had for lunch year by Date, Hot/Cold, Food type, Amount (how much).
My end goal is to set up a query linked to my form which will allow me to build list of different types of combos from the lunch table. Like, lunches during 2010-2012 that was hot pizza with a amount from 3-7.
Right now I am trying to place check boxes on my form for years, so I can pick which years I want as apart of my result. In my Query Design view I have the field named "Year of lunch" from the table "LunchTable" and in the criteria I have place the following:
IIf([Forms]![SearchList]![Check2012],[LunchTable]![Year of Lunch] Like "2012",0)
but it doesn't seem to work correctly. When the box is not checked I want it to display all years.
EDIT: I want to add that the field named "Year of Lunch" has about 15 years in it going back to 1997. So the value can range from 1997-2012 and with this button I basically want to say only return values with "2012" in the "Year of Lunch" field.