Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox problem
Message
De
01/01/2006 00:03:43
Reza Meamar
Homa Programming Group
Shiraz, Iran
 
 
À
31/12/2005 08:49:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01082238
Message ID:
01082312
Vues:
9
>I have a listbox in my form and a radiobutton with two option.
>I fill the listbox with a free table records (TCode N(5,0), TName C(15))
>My free table is ordered based on Tcode and Tname.
>When i select OPtiongroup1.option1 i want to show recordes based on Tcode order and when i select OPtiongroup1.option2 i want to show recordes based on Tname order and i want to last selected item in listbox dont changed and record pointer stay at previous record in table.
>how can i do this

>
>Off the top of my head and untested:
>
>Set up your list box like this:
>
>RowSourceType = 6-Fields
>RowSOurce = MyALias.TName, TCode
>
>In the Valid of your option group:
>
>
>IF This.Value = 1
>  SET ORDER TO TAG TCode IN MyAlias
>ELSE
>  SET ORDER TO TAG TName IN MyAlias
>ENDIF
>This.Parent.MyListBox.Requery()
>
My problem start from here. for example i have 4 records as below :
TCode TName
-------------
1 Wname
2 Aname
3 Uname
4 Hname

if i set order to TCode and i stay on TCode=3 in list box , so i change the order to TName, i want to stay on TCode=3 again, but it changed to another TCode.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform