Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disappeaaring Grid
Message
From
02/10/1997 13:11:19
Craig Smith
Indianapolis Public Schools
Indianapolis, Indiana, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00052462
Message ID:
00052884
Views:
35
>>I was hoping somebody might be able to tell me why my grid keeps disappearing from my form.
>>
>>The form has a pageframe with five pages on it. On the first page is a one-to-many page between parents and their children.
>>
>>Since users don't check existing parents for dupes before entering a new one, I've changed the LostFocus event of the parent's last name field. It compares that field's value to all of the existing parents in the table by doing a copy to a temp table. If reccount('temp')>0, it shows a form that displays all of the possible dupes from the temp table. If reccount('temp')=0, it informs the user that the parent record is unique. After the second time through the LostFocus event, the grid for the children disappears.
>>
>>I've been looking into save screen and restore screen, as well as manually closing and opening the dataenvironment tables. Neither seems to work. Is what I'm doing possible. If so, how?
>>
>>Thank you for any help you can provide,
>>_Craig
>
>a coworker of mine was having the same problem and it appeared that for some reason when switching pages she would lose her relation. we havn't had time to sit down and figure out why it happens yet or how to prevent it but for the time being i think she's just resetting the relation when that page gets focus.
>if you want, i can try to find out more about it from her tomorrow.
>or if you determine why it happens we'd love to know.
>
>hope this helps
>
>gray

Gray,

I thought the problem was due to a lost relation between the parent and child tables, but I was trying to remedy it by using the dataenvironment to open and close the tables and re-establish the relation between them. That would seem to be the way VFP 5.0 would work. Unfortunately that's not so. What I ended up doing was going with the tried, tested and true method of opening, ordering and relating the tables through code in the LostFocus event. I haven't had a problem with it since. Hope this helps your co-worker out, as well.

_Craig
Previous
Reply
Map
View

Click here to load this message in the networking platform