Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Still having problems with Parent/Child forms
Message
 
 
To
29/06/2000 10:59:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00386460
Message ID:
00386474
Views:
17
Using a cursor created with SELECT statement as RecordSource of a grid is not advisable. Make use of a Cursor created with CREATE CURSOR and populate it the way you want. Everytime you need new contents of the cursor, ZAP it and populate it again.

>I have a form with a combo box that selects code numbers from Products table; I have a grid that displays inventory transactions of the product chosen in the combo box. I have this code in the InteractiveChange event of the Cbox:
>
>PUBLIC varCodigo
>RELEASE ALL
>varCodigo=THIS.VALUE
>SELECT PRODUCT
>LOCATE ALL FOR codigonues=THIS.VALUE
>THISFORM.REFRESH
>DO invent
>
>Invent is a program that runs and adds transactions to the child table, based on the Code number selected in the combo box. Everything works fine except that when I try to END TRANSACTION, my grid goes blank, although the record is correctly added.
>
>I have this line of code in certain point of the invent program:
>
>SELECT MAX(Nivel) AS MaxLevelNo FROM invent WHERE codigonues = varCodigo INTO CURSOR myCurs
>
>The grid displayed correctly the new record BEFORE I added this line.
>
>Now it goes blank and even worse, the combo box can not filter the records anymore.
>
>I hope this is clear and somebody can help
>
>TIA
>
>Ulises
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform