Hi Folks
I have the following as the Row Source for a list box:
SELECT Field1, Field2 ORDER BY Field1, Field2;
Supposing the possible values for Field1 are 1 and 2, how do I get Field2 to sort in ascending order if the value in Field1 is 1 but in descending order if the value in Field1 is 2? I'm guessing it's something like this, but I don't know enough about SQL to work out the correct syntax:
SELECT Field1, Field2 ORDER BY Field1, If(Field1=1, Field2 ASC, Field2 DESC);
Any help would be very welcome.
Thanks
Remster