Mum,
You probably know this but just incase, check out @FormNewRecord() to create the new subform record and then look at FormFieldValue() for filling it.
I do exactly what Hammer described (I’m sure not as elegant as her) and it works great.
I may not be correct in doing so but I always redraw my screen so my subform especially if its on a tab looks correct and then save my subform record and main record.
Below is a section of code (Maybe not the best way, but.. It works) as an example.
Keep us posted on your progress.
// creating new sub record in offerings and filling Subform elements
var nn as Int nn = @FormNewRecord("offerings") FormFieldValue("offerings", "OffereeId", nn, voffereeID) FormFieldValue("offerings", "OffereeNumber", nn, nn) FormFieldValue("offerings", "salespersonID", nn, vofereeSalesPerson) FormFieldValue("offerings", "OffereeName", nn, vofereefullname) FormFieldValue("offerings", "OffereeType", nn, "I") FormFieldValue("offerings", "Property", nn, PropertyID)
Forceredraw()
// Save subrecord
FormCommit("offerings")
// Save Record FormCommit("property")
|