>DoDefault() && Execute the code in the Visual Class first, > && then execute the following: >WITH ThisForm > * If the user hits the NEW button, and is adding a new record, > * we need to grab the value in the array for the CostsID and > * put that value into the Quotes.CostsID field. > IF ThisForm.lAppendMode > REPLACE Quotes.CostsID WITH .aCostsID[1] > ENDIF > * Repeat this SET RELATION since adding a new record to the parent > * may break the relation. > SELECT Quotes > SET RELATION OFF INTO Costs > SET RELATION TO CostsID INTO Costs ADDITIVE > Replace ; > Quotes.dQuote WITH DATE(),; > Quotes.SB_Tax_Rat WITH ThisForm.aTaxRate[1] > .Refresh() > .CheckForMaterial() > .CheckForAluminum() > .cPageFrame1.cPage1.cboCustomer.SetFocus() >ENDWITH >Ok, glad it worked.