thisform.LockScreen = .T. lnSeqNo = thisform.nAddressSequenceNo IF this.ListIndex = 0 this.parent.txtTaxPct.value = 0 ELSE this.parent.txtTaxPct.value = thisform.GetStateTax(vStateDef.state_id) ENDIF this.parent.txtTaxPct.refresh() **-- get lookup views thisform.nCustId = VAL(this.List(this.ListIndex,2)) ** update view REPLACE cust_ident WITH thisform.nCustId IN vQuote lnCustId = thisform.nCustId =REQUERY('vMailmst') =REQUERY('vMailsub') =REQUERY('vCustAddrDef') IF _TALLY > 0 lnSeqNo = vCustAddrDef.seq_no ELSE =REQUERY('vCustAddrList') IF _TALLY > 0 lnSeqNo = vCustAddrList.seq_no ENDIF ENDIF thisform.nAddressSequenceNo = lnSeqNo **-- reset addresses =TABLEREVERT(.T., 'vCustAddr') =REQUERY('vCustAddr') ** update quote view REPLACE shipto WITH thisform.nAddressSequenceNo IN vQuote REPLACE cust_name WITH vMailMst.coname IN vQuote REPLACE address1 WITH vMailMst.addr1 IN vQuote REPLACE address2 WITH vMailMst.addr2 IN vQuote REPLACE city WITH vMailMst.city IN vQuote REPLACE state WITH vMailMst.state IN vQuote REPLACE zipCode WITH vMailMst.zipcde IN vQuote REPLACE country WITH vMailMst.ctry IN vQuote IF EMPTY(vQuote.cont_pers) REPLACE cont_pers WITH ALLTRIM(vMailMst.cFirstP) + ' ' + ALLTRIM(vMailMst.cLastP) IN vQuote ENDIF IF EMPTY(vQuote.contact_first) REPLACE contact_first WITH ALLTRIM(vMailMst.cFirstP) IN vQuote ENDIF IF EMPTY(vQuote.contact_last) REPLACE contact_last WITH ALLTRIM(vMailMst.cLastP) IN vQuote ENDIF IF EMPTY(vQuote.phone) REPLACE phone WITH vMailMst.cPhoneP IN vQuote ENDIF IF EMPTY(vQuote.fax) REPLACE fax WITH vMailMst.cFaxP IN vQuote ENDIF IF EMPTY(vQuote.email) REPLACE email WITH vMailSub.email IN vQuote ENDIF IF EMPTY(vQuote.url) REPLACE url WITH vMailSub.url IN vQuote ENDIF WITH thisform.pgfbase1.page2.cntBillTo .cboState.ListIndex = thisform.SetComboIndex('vStateDef', 'state_id', 'vMailsub', 'bt_state') .cboCountry.ListIndex = thisform.SetComboIndex('vCountryDef', 'cntry_id', 'vMailsub', 'bt_country') ENDWITH WITH thisform.pgfbase1.page2.cntShipTo .cboState.ListIndex = thisform.SetComboIndex('vStateDef', 'state_id', 'vMailmst', 'state') .cboCountry.ListIndex = thisform.SetComboIndex('vCountryDef', 'cntry_id', 'vMailmst', 'ctry') ENDWITH **-- reset salesperson WITH thisform.pgfbase1.page2.cboSalesPerson .ListIndex = thisform.SetComboIndex('vSalesperson', 'user_id', 'vMailsub', 'salesperson_id') ENDWITH **- set taxable thisform.lTaxable = IIF(thisform.lNewQuote, vMailsub.cc_taxe, vQuote.taxable) IF thisform.lNewQuote thisform.EnableAll() thisform.InsertDefaultHeader() thisform.InitCombos() thisform.InitFields() thisform.InitOriginal() ENDIF thisform.refresh() thisform.LockScreen = .F.>John,