Hi!
I want to sort my form with a Combo Box in another form.
The form frm_1, gets its data from a query qry_1 and the combo is forms![frm_2]![combo1] - it contains all field names from qry_1
I just cant figure out how to make the qry_1 take the field name by which it should be sorted from the combo.
I already had:
1.) qry.properties.sortby = forms![frm_2]![combo1]
but this obviously tells him to sort by a field which is not in the qry
2.) I tried to change the SQL ORDER BY Statement, but looks like a made something wrong, thoug it just had no effect:
ORDER BY "[qry_1]" & "." & "forms![frm_2]![combo1]";
maybe somone can help me out
Thanks!
-Michael
I want to sort my form with a Combo Box in another form.
The form frm_1, gets its data from a query qry_1 and the combo is forms![frm_2]![combo1] - it contains all field names from qry_1
I just cant figure out how to make the qry_1 take the field name by which it should be sorted from the combo.
I already had:
1.) qry.properties.sortby = forms![frm_2]![combo1]
but this obviously tells him to sort by a field which is not in the qry
2.) I tried to change the SQL ORDER BY Statement, but looks like a made something wrong, thoug it just had no effect:
ORDER BY "[qry_1]" & "." & "forms![frm_2]![combo1]";
maybe somone can help me out
Thanks!
-Michael