Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Values from a temporary table to a Grid on a From
Message
From
21/05/2003 07:35:23
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00790976
Message ID:
00790978
Views:
23
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()
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform