Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Processing multiple selected items from a Listbox
Message
De
09/12/1997 10:15:34
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00064644
Message ID:
00064664
Vues:
33
>>>I can loop thru the selected items, but what is an easy way to get
>>>back to the table, IE: record # or Primary Key, as I loop thru them.
>>
>>I would store the primary key in a zero-width column of the listbox.
>>Will that work for you?
>
>Sounds good.
>How can I reference that that column as I am looping thru?
use the list method of the listbox
WITH oListBox
for lnI=1 to .listcount()
if .selected(lnI)
lnRecno=.list(lnI,2) ** where column 2 is the zero width col with recno()

endif
endfor
ENDWITH

the listbox is populated in the same mannor

WITH .oListbox
for lnI=1 to recno('table')
.additem(table.field)
.list(.newindex,2)=alltrim(str(lnI))
endfor
ENDWITH

HTH
Gary
Helping Make Ideas Reality
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform