FUNCTION FontStyleStr ( oCtrl ) > * coCtrl can either be a form or a control > LOCAL lcRet > > IF PEMSTATUS(oCtrl,"FONTBOLD",5) ; > AND PEMSTATUS(oCtrl,"FONTITALIC",5) ; > AND PEMSTATUS(oCtrl,"FONTOUTLINE",5) ; > AND PEMSTATUS(oCtrl,"FONTSHADOW",5) ; > AND PEMSTATUS(oCtrl,"FONTSTRIKETHRU",5) ; > AND PEMSTATUS(oCtrl,"FONTUNDERLINE",5) THEN > lcRet = IIF(oCtrl.FONTBOLD,"B","") ; > + IIF(oCtrl.FONTITALIC,"I","") ; > + IIF(oCtrl.FONTOUTLINE,"O","") ; > + IIF(oCtrl.FONTSHADOW,"S","") ; > + IIF(oCtrl.FONTSTRIKETHRU,"-","") ; > + IIF(oCtrl.FONTUNDERLINE,"_","") > IF EMPTY(m.lcRet) THEN > lcRet = "N" > ENDIF > ELSE > lcRet = "" > ENDIF > RETURN m.lcRet >ENDFUNC && FontStyleStr >Dealing with properties belongs in a method. That's the idea of encapsulation, classes and objects. :)