this.enabled= (curSitus.AddressType'Not linked ')Here is the code, which updates this grid content:
******************************************************************** * Description.......: AddrStdMain.RequeryGridSources() * Calling Samples...: * Parameter List....: * Created by........: Nadya Nosonovsky 06/30/2001 01:26:29 PM * Modified by.......: Nadya Nosonovsky 07/02/2001 09:46:48 PM ******************************************************************** lparameter tnPropID if vartype(m.tnPropID)<>"N" tnPropID=BldMstr.PropID endif local lcDBC if vartype(oJC)='O' && Normal case lcDBC=oJC.CurState else lcDBC='MA' && for test purposes endif with thisform if .grdSitus.visible if m.tnPropID>0 * .grdSitus.recordsource='' select iif(prefcode='P',padr('Primary',11),'Alternative') as AddressType, ; ccode, town, StNum, StNumExt, Street, LotCode, Unit, ZipCode, SiteID ; from (m.lcDBC+'!SiteMstr') where PropID=m.tnPropID ; order by AddressType descending ; into cursor curTemp if _tally>0 select curSitus zap append from dbf('curTemp') else if reccount('curSitus')=0 insert into curSitus (AddressType) value ('Not linked') endif endif * .grdSitus.recordsource='curSitus' .grdSitus.refresh() select BldMstr use in select('curTemp') endif endif *!* if .grdOwner.visible *!* .grdOwner.recordsource='' *!* select ownerstnum, ownerStExt, OwnerStrt, OwnerUnit, OwnerCity, ; *!* OwnerState, OwnerZip5, OwnerCtry ; *!* from (m.lcDBC+'!OwnrAddr') where PropID==m.tnPropID ; *!* into cursor curOwner *!* .grdOwner.recordsource='curOwner' *!* endif endwith select BldMstrThe button is always enabled, even if AddressType='Not linked '. Do I need to refresh this button explicitly, IOW, grid refresh is not enough?