Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Values from a temporary table to a Grid on a From
Message
De
21/05/2003 07:35:23
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00790976
Message ID:
00790978
Vues:
22
Hi Neil.

I have a combo field on my form listing the seasons. When I select the Season in the combo box I want to display the relevant records in a grid.
For example if I chose AW2003 I would get:


AW2003 T57 JKT002 SAMPLE 1 0
AW2003 T57 JKT003 TECHNICAL 0 1


The easiest way is to create a parameterized view to display what is now in your csrMatch cursor. If, for some reason, you need to have it as a cursor, add a customer method to either your grid class or your form called ResetGrid and call it from the Valid() method of the combo box. Code like this in ResretGrid:
*** Rebuild the cursor used as the recordSource for the grid
SELECT csrMatch
ZAP
SELECT Season, Department, Number, Type ;
 FROM < Some Tables > WHERE < Some Condition ;
 INTO CURSOR Temp NOFILTER
SELECT csrCategory
APPEND FROM DBF( 'Temp' )
USE IN Temp
GO TOP IN csrCategory
*** Now refresh the grid
*** If the reset method is a form method,
*** obviously the following reference must be to Thisform.MyGrid
This.Refresh()
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform