Since subforms in Table View seem a bit akward to work in, I added some unbound elements in my parent form to make the data entry easier for the user. After entering data into these "temporary" fields, the user hits "add" button to "move" their data into a new record in the subform. However, I cant figure out how to "post" my data from the unbound elements on the parent record into "new records" in the subform. The new command "@createnewrecord" would be great to use, but I assume that will only create a new parent form, when what I need is to add the info to new "child records" as needed. The programming I have in place is giving weird results.When I hit the "add button, its posting into wrong fields in the childrecord. No other feilds are being filled in, and I dont know how to start a new blank record for the next item.
Here's my prgramming for the add button (on element entry)
var vrecords as int
vrecords = @formresultsettotal("lineitems")
FormFieldValue("LineItems", "Stock no", vrecords, stock) FormFieldValue("LineItems", "action", vrecords, action) FormFieldValue("LineItems", "quality", vrecords, quality) FormFieldValue("LineItems", "pattern", vrecords, pattern) FormFieldValue("LineItems", "color", vrecords, color) FormFieldValue("LineItems", "wide", vrecords, wide) FormFieldValue("LineItems", "length", vrecords, length) FormFieldValue("LineItems", "shape", vrecords, shape) FormFieldValue("LineItems", "soldby", vrecords, sold by) FormFieldValue("LineItems", "loc", vrecords, loc) FormFieldValue("LineItems", "price", vrecords, price) FormFieldValue("LineItems", "comments", vrecords, comments) FormFieldValue("LineItems", "taxable", vrecords, taxable) Readonly(quality,0) readonly(pattern,0) readonly(color,0) readonly(wide,0) readonly(length,0) readonly(shape,0) clear(stock, action, quality, color, pattern, wide) clear(length, shape, sold by, loc, price, comments, taxable, li nu) visibility(update, 0) visibility(edit, 1)
Thanks, in advance for any suggestions. Steve
|