Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox display error
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00933369
Message ID:
00933786
Views:
16
Hi Bill,

I still don't understand why records are sorted in wrong order with old approach. Am I correct in assuming that listbox shows records for one particular cID? in this case cID is irrelevant for sorting because it's the same for all records.
The VFP listbox doesn't have rebuild() even. I guess you're using some kind of gramework. Anyway, I would move part of your code to a custom method and call from rebuild() and Init() of the listbox.

>I like the way you think. That would exactly cause this bug. However, the data is saved as "2004" not "1904".
>
>After working on it this weekend, have Got it to work . . . kind of.
>I put the following code in the rebuild() event of the ListNav1 List Box:
>*=========
>LOCAL nCount
>m.ncount = 0
>DODEFAULT()
>
>SELECT donorhist
> SET ORDER TO Wizard_1 && cID+ str(20991231 - val(cDate))
>* this puts the ID in ascending & cDate in descending sequence
> SET FILTER TO donor.cid = donorhist.cid AND (not DELETED())
>GO TOP
> COUNT TO m.nCount
> GO TOP
>this.Refresh()
>*=========
>This works fine except for the first record that appears when you open the form. It's in ascending sequence. As soon as you navigate to another parent record, then all child records appear in descending sequence.
>Any ideas on hold to get it to work for the first record?
>
>Bill Wright
>
>P.S. I'm not that happy with this solution in that it's a "work-around", but after a while you get desperate. <bg>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform