I have a mathimatical vb 6.0 question. I have a program that inserts records in the system. Here is how it works.
I have a MasterQty table and ChildQty table. The user can upate only the child table but keep the ChildQty always equal to MasterQty. ChildQty should not go below or above the MasterQty.
Now the Qty is always same;
MasterQty ChildQty
120 120
I get user input for a new Qty.
NewQty
50
Now I should be able to insert a new record for the the Difference of
Difference = MasterQty - NewQty
Difference = 120 - 50 = 70
So I should insert two Records
1. NewQty = 50
2. Difference =70
Now the User can update the NewQTy or the Difference.
Lets say he wants to update the Difference qty to 30.
Difference = MasterQty - NewQty
Difference = 120 - 50 - 70 - 30 = 40
I have a MasterQty table and ChildQty table. The user can upate only the child table but keep the ChildQty always equal to MasterQty. ChildQty should not go below or above the MasterQty.
Now the Qty is always same;
MasterQty ChildQty
120 120
I get user input for a new Qty.
NewQty
50
Now I should be able to insert a new record for the the Difference of
Difference = MasterQty - NewQty
Difference = 120 - 50 = 70
So I should insert two Records
1. NewQty = 50
2. Difference =70
Now the User can update the NewQTy or the Difference.
Lets say he wants to update the Difference qty to 30.
Difference = MasterQty - NewQty
Difference = 120 - 50 - 70 - 30 = 40