Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A Column Grid with 2 possible controlsource
Message
De
21/10/1998 13:42:29
 
 
À
21/10/1998 13:31:37
Joao Godinho
Fredesenvolv, Lda
Lisbon, Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00148996
Message ID:
00149007
Vues:
25
Joao ---

Create a view to join the tables:

CREATE VIEW myview AS ;
SELECT table1.cd_type,table2.ds_type2 AS ds_type ;
FROM table1,table2 ;
WHERE table2.cd_type=table1.cd_type AND table1.cd_type = 1 ;
UNION SELECT ;
SELECT table1.cd_type,table3.ds_type3 AS ds_type ;
FROM table1,table3 ;
WHERE table3.cd_type=table1.cd_type AND table1.cd_type = 2 ;

The result is a table with cd_type,ds_type matched properly. Use the view for the grid.




>I have a grid based on table1 with 2 columns. Column controlsource is table1.cd_type Column2 the controlsource is table2.ds_type2 when table1.cd_type = 1 or is table3.ds_type3 when table1.cd_type = 2
>
>table1
>cd_type N(5)
>
>table2
>cd_type N(5)
>ds_type2 C(35)
>
>table3
>cd_type N(5)
>ds_type3 C(35)
>
>Thank to you all
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform