Post a Value From a Parent Form to a Subform
Use the SBasic command FormFieldValue() (See the Sesame Programming Guide for more information on this, and other SBasic commands). In the context of a parent form with a subform that has multiple records, here is a loop from a parent to the subform records:
// This syncs the SOLines!SODate and SOLines!SONum with Orders!SODate and Orders!SONum // in case the SODate is moved into the future during the building process, or // SONum is inadvertently changed during the middle of the building process vCnt1 = @FormResultTotal("SOLines") vLoop1 = 1 While vLoop1 <= vCnt1 { FormFieldValue("SOLines", "SODate", vLoop1, vSODate) FormFieldValue("SOLines", "SONum", vLoop1, vSONum) FormFieldValue("SOLines", "ClientID", vLoop1, vClientID) FormFieldValue("SOLines", "ShipToID", vLoop1, vShipToID) FormFieldValue("SOLines", "ShipToClientID", vLoop1, vShipToClientID) FormFieldvalue("SOLines", "ClientName", vLoop1, vShipToName) If vDNI = "Y" { vDNIinv = "E" FormFieldValue("SOLines", "Invd", vLoop1, vDNIinv) FormFieldValue("SOLines", "BO", vLoop1, vDNIinv) } vLoop1 += 1 }