hello friends... back in business after a long time...
I need some help to make a simple (?) query.
I have my table as follows:
monthid month year riceprice wheatprice maizeprice
1 jan 2007 350 450 340
2 feb 2007 355 455 345
and so on...
i have a form with a list box named commodity containing the list of these commodities. i.e. Rice, Wheat and Maize.
i want to write an SQL statement in the preview button of the form in such a way that when i select riceprice from the listbox of the same form, and click preview, then a simple query will show the fields monthid, month, year and riceprice... when select wheat then only wheat price will appear... and so on.
I know i can do it simply making 3 different queries, but i want to write SQL in the form instead.
Please help me.
I need some help to make a simple (?) query.
I have my table as follows:
monthid month year riceprice wheatprice maizeprice
1 jan 2007 350 450 340
2 feb 2007 355 455 345
and so on...
i have a form with a list box named commodity containing the list of these commodities. i.e. Rice, Wheat and Maize.
i want to write an SQL statement in the preview button of the form in such a way that when i select riceprice from the listbox of the same form, and click preview, then a simple query will show the fields monthid, month, year and riceprice... when select wheat then only wheat price will appear... and so on.
I know i can do it simply making 3 different queries, but i want to write SQL in the form instead.
Please help me.