View Full Version : OrderBy problem


docptl
11-04-2001, 05:34 AM
Hi - I've created a series of forms, tied to some autokeys (F2, F3, etc) that will pop up a quick list of major database entities on top of whatever else I'm doing. The F2 list does customers, the F3 list does products from my inventory, etc.

I put a few buttons in the form footers to allow the user to change the OrderBy property and thereby display the list ordered by other fields than the default.

My customer form works perfectly, but none of the other forms re-order when the buttons are clicked; they just sit there as if nothing had happened.

I've tried using indexed and un-indexed fields to orderby. I've tried setting the OrderByOn property in the FormOpen event. I've tried Requery of the form after clicking the buttons. Nothing works.

I've read and re-read both the property sheets for the form that works and the ones that don't as well as the event code - can't figure it out.

Can anybody help?

Thanks,
Dave

DES
11-05-2001, 10:23 AM
Dave: Not exactly sure what is going on there. It sounds to me like you are popping up another form to show these lists on. Then you are talking about two different mechanisms. The F2 F3 function keys to open them and then a button to sort them. If that is the case then the Function buttons are not showing you the sort order you want and when you click on the other buttons they may not be pointing to the right objects to apply the sort to.

I would start by checking the one that works and see if it is naming a form to apply the working sort to while the ones that are not working may not be.

If you would like to send me a sample of what you are working on I will look at it for you.

docptl
11-05-2001, 02:43 PM
Hi Deb - Yes, each list comes up in its own popup form and the buttons that change the sort order are in the footers of the individual forms they refer to.

DES
11-05-2001, 03:56 PM
I sent you a sample I hope it helps.