Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To: Use LISTBOX to select records to view/edit elsew
Message
 
To
17/08/2000 14:08:12
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00405098
Message ID:
00406499
Views:
25
Pete,
I also have learned the hard way to 'randomize' the data I enter. Years ago I entered about 10 'employees' once in alphabetical order - and put the app in beta before realizing I had a couple of index orders set incorrectly.

It still looks like at some point your index order is being reset programmaticaly. When you open the form, open the debugger, go to the Watch window and type order('MyTable') to see the controlling index tag. Then add a record and go back to the debugger. If the order has changed, as I suspect, start the form again, open the debugger and click in the gray margin to the left of the "Order('MyTable')" phrase. You'll see a red dot which means the debugger will stop the program when this item changes value. Go back to the form and add your record. The code should stop at the point where the order is set to 0 or to another index.

HTH
Barbara

>Barbara,
>
>Me again!!! You ever have one of those "things" that just stares you in the face so obvious... well......
>
>When I keyed my test data, it just so happens I keyed it in reverse alphabetical order (luck of the draw)..
>then, I accidentally set the index order for descending which just so happened to match. Soooo when
>I kept looking at it, I kept saying, "it didn't change and sort" but in reality it did.
>
>BUT
>
>Here is what really through this train of thought... when I first "fire" the form, it works and sorts correctly
>(now that I fixed the index order) UNTIL I add a new record. Then it goes haphazard on the sort, not alpha,
>not reverse alpha. When I exit the form and rerun it, it sorts correctly with the new record(s) added.
>
>I was calling a REQUERY on the listbox to add and display the new record followed by a refresh. Is that right?
>
>
>Pete
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform