Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid showing last rec in child table when it should be e
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00112275
Message ID:
00112306
Views:
17
Brenda,

Do you have any code that is doing totals on the child records? That might be moving the record pointer on you.

IMHO grids are much easier to use with parameterized views of the child table instead of "relational" definitions in the DE and grid properties.

>my problem only appears to be when first loading the form, and the grid's parent record has no corresponding child records. the grid either displays the last child record (seems to only happen while stepping through in the debugger) or the last record quickly flashes in the grid and then the grid is empty.
>
>the grid is bound to a table that is the child table in a relationship. the relationship is fully defined in the grid's properties. for other processing reasons i also open the two free tables, set the order and set the relationship before calling the form. i do not have a data environment defined for the form.
>
>following in the debugger - the child rec pointer is eof() during the load (as it should be), but during the init it points to the last child record. i have tried to reestablish the child pointer by doing a GOTO RECNO(), or a SKIP then a SKIP -1 on the parent. this works for the current event (grid1.init), but in the next event (form1.init) the child pointer points back to the last record.
>
>1) would like to solve the above problem of grid showing last record or flashing last record
>2) when does the system establish the relationship defined in the grid's properties (remember i have the relationship defined in the grids properties and i have no data environment for the form)
>3) does the debugger sometimes not give a true picture, i.e. the last record whoing in the grid only seems to hapen while i am in the debugger.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform