Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One to Many Record Input
Message
From
15/09/2004 20:06:11
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
15/09/2004 13:03:27
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00942327
Message ID:
00942683
Views:
14
>How do you handle putting in new records? Say I click "ADD" on parent form and a new number is created, at which point does my child form start recieving records. Would I insert into the child table at the same time I entered the record in the parent. Then how about entering multiple records into the child. What I want to do is create several records before they actually go into the table.

Let's assume the case that the grid (and editing objects) for the parent-table is in Page1, and for the child-table, in Page2.

If the user presses "Add", either a parent record or a child record would be added, depending on which page the user currently is.

Similar for "Delete".

In the usual case, I would leave it up to the user, to add the child records separately. But in specific cases, I have automatically added a child record, or several, as soon as the parent record was saved.

I don't like having pending changes to several records at once, since this may mean lots of lost work, in case something goes wrong. I therefore save the current record, before allowing the user to move to another record, or add a record.

However, I acknowledge that this can lead to some difficulties in validation, since some validation rules depend on data in more than one record. The classic case is accounting transactions, where sum(debit) must be equal to sum(credit).
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