Hello, hoping someone can help!
I am making a mailroom app for my company. I have several forms as follows:
Form A: Info about packages being delivered
Subform A: Collects info about each individual package, includes 'Package No.' field which is unique and is input by user, and also 'Package Status' field (package status are either 'Signed In' or 'Signed Out'
Form B: Info about when people collect their parcels from the mailroom, and has a signature field
Subform B: Collects info about each individual parcel being collected. The user chooses the Package No. from a lookup to Subform A, and then sets the Package Status as 'Signed Out'.
Form B needs to use a subform for the individual packages being collected so that multiple packages can be signed out at one time, with the same signature.
My problem is that I am trying to set the forms so that when a package is signed out in Subform B, the Package Status field in Subform A will be updated.
I am using the following code in the 'On Success' bit of Subform B:
Package_Details = Input_Packages_SubForm[ID == input.Package_No_1];
Package_Details.Package_Status=input.Package_Status;
It is working perfectly when I go into Subform B itself to sign out a package, but doesn't work when Subform B is used as part of filling out Form B.
Please can someone help? I think maybe I need to put a function into the Subform bit of Form B, but I have no idea how to do so.
Any help that anyone can give me would be greatly appreciated.
Thank you.