Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to setup the tables
Message
From
01/09/2002 14:06:33
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
01/09/2002 10:27:50
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00694820
Message ID:
00695798
Views:
21
>>How do you usually handle parent-child in this case
>
>I have used codemine for the last few years and one of the standard forms is child data form. I haven't checked but think I can have a child data form call a child data form (at least in version 7).
>
>At the moment I'm leaning toward creating a master form with a grid that will call children to make selections. The grid will allow for a very large number of selections and can be reviewed by selection easily.
>
>The question of special rules for some the selections is another issue. I'll have to design some class that is called just before and after a selection is made. I might be able to use the builtin classes from codemine. Codemine does have beforenew and afternew methods and I will (most likely) use them to trigger my class methods.
>
>I see the methods returning information that is data driven to account for all the small special requirements.
>
>Thanks for your help.
>John

There is yet another possibility - just have parent-child as usual in your form, and add a button to "open the child". When the user presses this button, the form will re-load data for the selected child - this time as parent.

To be able to "go back", every time the user selects a child to be opened as parent, you should add the currently selected article (before making the selection) to a LIFO stack - in VFP, that would be an array. The array would grow every time the user selects a child (to be opened as parent).

The "back" button would go back to the previous element (last element in array) and reduce the size of the stack again.

As in many other cases when the user selects a different record ("next", "previous", "first", "last"), you must make sure the current record(s) is saved before going to another one.

HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform