Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To: Use LISTBOX to select records to view/edit elsew
Message
From
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:
00406278
Views:
33
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

>Peter,
>What happens if you use 'alias' instead of 'fields'. Keep the Rowsource the same.
>
>Also, check with the debugger to be absolutely certain nothing changed the order of your table.
>
>HTH
>Barbara
>
>>Barbara,
>>
>>Hi!! Actually, the listbox has only one of about 20 fields in it... the name. I also have an index in the file for
>>the name field as well. In the DE on the form, I set the ORDER for the file (apmas) to the name of the field
>>(name). The listbox has one column (name). The rowsourcetype is set for 6-Fields and the rowsource is
>>set for apmas.name. Controlsource is blank and bound to is false.
>>
>>This works, sort of. It moves the record pointer alright but the displayed list isn't sorted. I thought that was all
>>I needed to do to sort the list???
>>
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform