View Full Version : Code for ordering forms


paulmcdonnell
09-11-2001, 12:38 AM
Hi guys,

Sounds simple but I want a command button to order the form data displayed by date or name or whatever...

Do i need to use code behind the button to change the underlying query or can I do it on the form itself...


I'm not sure what to use to do this on the form

any ideas..
cheers
paul

charityg
09-11-2001, 12:23 PM
Button_Click()
Me.OrderbyOn=True
Me.Orderby="fieldtoOrderby"

paulmcdonnell
09-12-2001, 02:11 AM
Thanks Charity.....
Worked ACE!
Do you no how you do the same thing but filternig by the selected value of a combo box?

Thanks again...
PAUL

paulmcdonnell
09-12-2001, 02:12 AM
err that should be "know"

charityg
09-12-2001, 08:19 AM
me.filteron=true
me.filter="[fieldname]='" & cboName & "'"