Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing ListBox with program
Message
De
19/01/2004 13:00:51
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00867996
Message ID:
00868202
Vues:
19
>Hi,
>I've gotten much farther now but can't figure out how to specify the name of the table
>still. In the following, the table name would be the buttons(x).caption name. But isn't
>RowSource somehow the equivalent of a use table statement. In any event, I have flagged
>the problem with &&xxxxxxxxxx
>
>Thanks so much Steve Elster
>
>mm = transform(thisform.OptionGroup1.Value) && the number of the option chosen
>nn = mm
>nn = val(nn)
>oo = lower(alltrim(thisform.OptionGroup1.buttons(nn).caption))
>
>&&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>mytable = "c:" + oo + ".lcontact,fcontact" && problem defining table name??
>&&xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>thisform.list1.RowSource = myTable
>thisform.list1.RowSourceType = 6
>thisform.list1.reQuery() && is this how to requery a ListBox

The table name is the problem, because listbox with RowSourceType=6 expects an alias, not a table name. So, you should make sure the table is open and know its alias. Since you already have the table names in the option buttons captions, you can make sure these tables are open, and store their aliases somewhere (maybe by adding a property to the buttons themselves). Whichever way you do this,
thisform.list1.rowsource=lcTheAlias+".lContact,fcontact"
And the rest will be OK then.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform