Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Navigating a child table
Message
 
 
To
02/08/2007 13:39:03
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01245561
Message ID:
01245564
Views:
21
>I have a parent-child form. The child data is displayed in non-grid controls on a pageframe which is itself inside a pageframe. Since the child table is not within a grid, I need a way to navigate the records in the child table. I thought to do this via a dropdown combo with the following code:
>
>** cbo.InteractiveChange
>this.Value = this.value
>select rta_payments    && the child table
>locate for pmt_id = val(this.Value) and tip_id = tip.tip_id
>select tip   && the parent table
>this.Parent.refresh   && refresh the page displaying the child data
>dodefault()
>
>
>This seems to work except when subsequently clicking on the page or any of its controls, I find the child record pointer jumps back to the first child record and does not stay on the one that was selected in the combo. Watching this in the debugger I find that this click triggers a page.activate which contains a page.refresh, but there is nothing there or in any of its controls that would cause a move in the record pointer.
>
>Any thoughts on what might be going on? Or is my approach flawed?

Hard to say exactly what's going on, though you may try to put recno('Child') in the watch window in the debugger and see when it changes.

However, I would use Updateable view for the child table or my latest favorite Cursor Adapter. Thus instead of relations you always would see a subset of data...
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform