Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Binding a Combo programatically
Message
De
21/03/2002 14:43:35
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00635187
Message ID:
00635682
Vues:
17
>>This is what I have in the load method:
>>
*Get data to populate combo2 in page2 - Lab test codes
>>select * from labtests into cursor LabTestInfo order by testcode, testname
>>
>>>The combo supposed to have combo.RowSourcetype = 3 - SQL statement and combo.RowSource = [your SQL statement here]
>>
>>I set the properties as follows:
>>
ControlSource = mLabTestCode
>>RowSource = LabTestInfo.testcode
>>RowSourceType = 2-Alias
>>
>>In the Save button I have the same select statement as above, but the newly entered data does not show up in the combo after clicking Save. It does if I fire the form up again.
>>
>>TIA.
>>
>>- Ravi

Hi Nick:

I am bit confused as to where you I should place what you suggest here. In the Save button?

>This should work fine with
>
>combo.Requery()
>combo.Refresh()
>
>

And where does this go?

>if you set
>
>combo.RowSourcetype = 3
>combo.RowSource = "select * from labtests into cursor LabTestInfo order by testcode, testname" && you don't need quotes if you enter it in Property sheet.
>
>
>Or you can make it as Dragan says. But really you don't have to have a special method to fill the combo as your case looks like the standard usage for combo.RowSourcetype = 3 - Select statement.

Thanks.

Ravi
- Ravi

True greatness consists in being great in little things.
- Charles Simmons
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform