B
Bob Quintal
WHERE (((tbl_COSTAPPEND.COSTYear)=[Forms]![frm_Cost FilterHi all
I have a form that shows ID, DESCRIPTION, COST, PERCENTAGE &
YEAR. The record source of this form is a query. I've also
placed an unbound combo box in the form and for the criteria
of the field YEAR I've made a referance to the value of the
combo box so that when the user selects an entry from this
combo box the form is filtered based on the value selected..
What I want to do is instead of having one year only being
displayed on the form I'd like to be a able to see any two
years together, e.g. the combo box above COST, PERCENTAGE &
YEAR will display 2007 and if the user wants to comapre with
previous year then I'd have a second combo box but this time
above the field (COST, PERCENTAGE & YEAR) i.e the same field
is placed in the form twice.
Any ideas how to do this because if i specify a criteria for
the second year field then it just places with the first
cirtera
SQL Statement used;
SELECT tbl_COSTAPPEND.COSTID, tbl_COSTAPPEND.COSTBinNumber,
tbl_COSTAPPEND.COSTStandardPerKg,
tbl_COSTAPPEND.COSTPercentageCopper, tbl_BIN.BINDescription,
tbl_FAMILY.FAMILYType, tbl_COSTAPPEND.COSTYear,
tbl_COSTAPPEND.COSTStandardPerKg,
tbl_COSTAPPEND.COSTPercentageCopper, tbl_COSTAPPEND.COSTYear
FROM tbl_FAMILY INNER JOIN (tbl_BIN INNER JOIN tbl_COSTAPPEND
ON tbl_BIN.BINID = tbl_COSTAPPEND.COSTBinNumber) ON
tbl_FAMILY.FAMILYID = tbl_BIN.BINFamilyType
WHERE (((tbl_COSTAPPEND.COSTYear)=[Forms]![frm_Cost Filter
050707]! [Text34]));
I'd like to avoid using a subform in possible
Thanks
050707]![Text34]) OR ((tbl_COSTAPPEND.COSTYear)=[Forms]!
[frm_Cost Filter 050707]![Text35]));
To do this from the query builder, just add the second combobox
reference underneath (next row down) the existing one.