Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo box to scroll thru a database
Message
 
 
À
24/03/2010 10:24:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01456119
Message ID:
01456936
Vues:
31
>>>ok can i like use the same method to scroll thru a different table using a combo box?
>>>
>>>
>>>cause im implementing into my real program now. but the SQL populates the combo box from Table X and the fields get their values from Table Y. i need Table X like this because i wanna be able to add stufff from X to Y Y doesnt hav all the fields.Since it isnt always needed.
>>>
>>>so can i populate from X and still be used 2 scroll y?private keyS?
>>
>>Sorry but I don't understand what you are saying.
>>Cetin
>
>ah ok like if we do this
>
>select * from table1 where item='E' into cursor crev&& combo box source
>&&inter change 
>=seek(crev.id,'crev','id')
>thisform.refresh
>
>this works fine if the control course of the fields is going to be table1.X
>
>but what if i want the control source to be table2.
>so like if we select PEter from table 1 we get to see its number which is 5 that exist in table 2
>if we select Kem from table 1 we get to see my number which is 1. thats possible?

I think you're going in cricles. The combobox rowsource should be one cursor, and your form controls should be bound to a different table (cursor).

=seek(crev.id,'crev','id') -- makes no sense - why do we need to search in the same table?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform