lcFormat = ALLTRIM(fg.txt_format) && TEXT_LEFT coming in from the table. lnFormat = &lcFormat && lnFormat is now numeric *** I prefer to do this that way *** lnFormat = VAL(lcFormat) *** or even easy *** lnFormat = VAL(ALLTRIM(fg.txt_format)) *** but it's your choice apierror = DrawText(.hDC, lcText, lnLen, txtbox, lnFormat)