Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Query switch
Message
De
03/09/1998 13:36:42
 
 
À
03/09/1998 13:31:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00132878
Message ID:
00132881
Vues:
14
>I have a grid on a form thats based on a local view which works well. The user wants to be able use the same grid to get a view based on different parameters which would require a different kind of querry of the same underlyng data. Basically it is the exact same query with a different join type.
>
>
>My thought was to create a second local view and change the data source property of the grid to the second view but when i switch to it the grid goes blank and when i toggle back to the first view the data in the grid is scrambled. Both views work when tried by hand against the data.
>
>
>
>Is my whole approach wrong? Is there a way to programatticlay change the sql of the view to specify a different join?
>
>TIA
>Chris

You still can switch Grid.Recordsource and doing this carefully you will not lose grid data: you should reset not only grid.recordsource but also all column.controlsources
With Thisform.Grid1
.Recordsource=""
.Recordsource="view2"
.Column1.Controlsource="view2.field1"
.Column2.Controlsource="view2.field2"
....
.Refresh
Endwith
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform