******************************************************************** * Description.......: AddrInGrid.GotFocus * Calling Samples...: * Parameter List....: * Created by........: * Modified by.......: ******************************************************************** with this if .parent.readonly set cursor off endif if lower(.parent.parent.name)=lower('grdBldMstr') .forecolor=AddrStat.custColor && this.parent.parent.myForeColor(evaluate('BldMstr.'+thisform.AddrField)) endif store .parent.parent.cCurRecBackColor to .backcolor * .selectedbackcolor = .parent.parent.cCurRecBackColor * .selectedforecolor = .parent.parent.cCurRecForeColor .fontbold=.t. .OldValue=.value && Save the current value with .parent.header1 .backcolor=rgb(64,128,128) && green .forecolor=rgb(255,255,255) && white endwith endwith ******************************************************************** * Description.......: AddrInGrid.InteractiveChange * Calling Samples...: * Parameter List....: * Created by........: * Modified by.......: ******************************************************************** local lcSource lcSource=upper(justext(this.parent.controlsource)) if inlist(m.lcSource,'STREET','OWNERSTRT') thisform.UpdateStreetPosition(this.value) endif ******************************************************************** * Description.......: AddrInGrid.LostFocus * Calling Samples...: * Parameter List....: * Created by........: * Modified by.......: ******************************************************************** set cursor on with this.parent.header1 .backcolor=rgb(192,192,192) && gray .forecolor=rgb(0,0,0) && black endwith local lcSourceTable, lcFieldName with this if not (.readonly or .parent.readonly or .parent.parent.readonly) lcFieldName=justext(.controlsource) lcSourceTable=juststem(.controlsource) if !empty(m.lcFieldName) and !empty(m.lcSourceTable) if .value<>.OldValue && value was changed if empty(.value) if .lEmptyNotAllowed && for Street field, for example =messagebox('This field could not be empty!',48, 'Revert') .value=.OldValue else if type(m.lcSourceTable +'.PropID')='N' ; and evaluate(m.lcSourceTable +'.PropID')>0 && Linked record if !inlist(lower(thisform.ProcType),'trxnproc','prclproc') replace (m.lcFieldName) with .null., ModiType with 'C' ; in (m.lcSourceTable) endif endif endif else && new not empty value replace ModiType with 'C' in (m.lcSourceTable) endif .parent.parent.UpdateStatus(m.lcFieldName) && Value was changed endif endif endif endwith *********** Methods for the grid: ******************************************************************** * Description.......: GrdAddrStd.UpdateStatus * Calling Samples...: * Parameter List....: tcSourceFld * Created by........: Nadya Nosonovsky 07/26/2001 11:52:31 AM * Modified by.......: Nadya Nosonovsky 07/31/2001 02:37:00 PM ******************************************************************** lparameter tcSourceFld if vartype(m.tcSourceFld)<>'C' or empty(m.tcSourceFld) tcSourceFld='street' endif local lcAddrField with thisform lcAddrField=lower(.AddrField) store .t. to .lOkChangeStatus, .lFieldChanged if evaluate('BldMstr.' + m.lcAddrField)='5' && Auto_Suspect do case case m.lcAddrField='addrstats' .lOkChangeStatus=.ValidateStreet(BldMstr.Street,'street') && Don't change status to manually resolved for invalid streets case m.lcAddrField='addrstato' .lOkChangeStatus=.ValidateStreet(BldMstr.OwnerStrt,'ownerstrt') && Don't change status to manually resolved for invalid streets endcase endif endwith ******************************************************************** * Description.......: GrdAddrStd.AfterRowColChange * Calling Samples...: * Parameter List....: * Created by........: * Modified by.......: Nadya Nosonovsky 12/12/2001 02:35:39 PM ******************************************************************** lparameters nColIndex local lnReccount, lnRecno lnReccount=reccount('BldMstr') lnRecno=recno('BldMstr') with thisform .lockscreen=.t. if this.nCurRec<>m.lnRecno if .lFieldChanged and .lOkChangeStatus .lockscreen=.t. goto this.nCurRec in BldMstr replace (.AddrField) with '6', ModiType with 'C' && Manually-Resolved goto m.lnRecno in BldMstr this.refresh() store .f. to .lFieldChanged, .lOkChangeStatus endif if .ProcType='prclproc' and .SubProc='ppsitus' and not .lShowStateAddress .RequeryGridSources() else .UpdateStreetPosition() endif .NavStand.navUpdate() .edtNotes.refresh() endif this.statusbartext=space(20)+"Record "+ transform(m.lnRecno)+" of "+ ; transform(m.lnReccount)+ " in BldMstr (Total number of records to process " + ; transform(.nRecords) + ")" if !empty(.BusMode) and .BusMode = "Situs" .swtch1.ChangeTown(iif(vartype(oJC)='O',oJC.CurState,"MA"),BldMstr.Town) endif if !empty(.BusMode) and .BusMode = "Owner" .swtch1.ChangeTown(BldMstr.OwnerState,,BldMstr.OwnerCity) endif this.nCurRec=m.lnRecno .lockscreen=.f. endwith *dodefault(m.nColIndex)Grid is based on Highlighted grid by Cetin Basoz. The error seems to ocur mostly for "Suspect" records, e.g. if I change status to Manual-Resolved, I'm able to make changes, otherwise - no.