I have an application that tracks information pertaining to a printing press run. Part of this is to track the rolls of paper being used. The interface is below.
I have an “Inventory” table that tracks the items shown in the portal view above. The idea is that the operator types in the roll number and all the other fields automatically fill in except the End DIA (end diameter). At the end of the press run the operator manually enters the ending diameter of the roll of paper.
I have a “consumed” table that has a field for the roll number and the ending diameter. If I create a new record in the “consumed” table and input both a roll number and an ending diameter directly into the “consumed” table, the corresponding roll in the inventory table is updated with the ending diameter – which becomes the current/beginning diameter the next time the roll of paper is used.
I can then create another layout that will show me every time a roll of paper was used and the corresponding ending diameter. See below.
Here is my problem. I need a trigger on the main interface that will create a new record in the “consumed” table and copy the values of the roll number and the ending diameter to the consumed table – without the user having to change interfaces. Main interface is below.
I have tried the solution offered by philmodjunk but since I am using tabs, I have a problem with the go to original layout since it takes me back to the first tab in the layout. I have also tried to get the value of the tab and use that to return to and I still had no luck.
I have also tried the Magic Key solution – again with no luck. I have had mixed results with this where I can create the new record and copy the ending diameter and roll number however I have two problems with this. Only every other record works. By that I mean every other time I click the trigger, the script works but every other time it creates the record and copies the ending diameter but not the roll number. In addition, it is creating a new Inventory record which I do not want it to do.
I have tried various relationships with no luck either.
Below is one of the most recent tries at the Magic Key approach.
If anyone has any solution for this I would like to hear it. I am open to a Team Viewer session if anyone wants to help that way too.
Thanks for any help.