Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grids and SET RELATION problem
Message
 
À
26/04/2001 13:25:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00500174
Message ID:
00500501
Vues:
45
This message has been marked as a message which has helped to the initial question of the thread.
Don't forget that you should set the recordsource of the grid to "" BEFORE you close it's table or any formatted columns, column controlsource etc. will revert to unformatted.

Barbara


>
>Ok, you drove me nuts with this one so I had to poke at for awhile! I set up a test situation with two grids that showed clients (parents table) and accounts (child table). I did a SET RELATION TO in the form's .Init() code, then placed code in a command button's .Click() to remove the relation. After tinkering, here's what I had to do to show all accounts after the relation was broken:
>
>
select clients
>set relation to
>select accounts
>use
>use accounts in 0 shared
>THISFORM.grdAccounts.RecordSource = "accounts"
>THISFORM.grdAccounts.Refresh()
>
>The trick was to reset the .RecordSource of the child grid. When an alias used as a .RecordSource is closed, the grid loses the reference.
>
>Now I can sleep tonight!
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform