Hi!
There is nice function - TxtWidth(). It allows to calculate the size of text by font and font size. For field, get the field size and replicate it with character that have average width:
TxtWidth(replicate('A',FieldSize),'Arial','12')
Above function returns required width for character fields. Of course, when you use 'W' instead of 'A', for most fonts above function will return larger number. For numeric fields replace 'A' by '8'.
There is also FONTMETRIC( ) function, you can give it a use too.
>hi, Can anyone help me with my little problem ....
>
> I'm doing a "Report Designer" and i need to know the size (height and width) to any field to a report field.
>
> The user can say the Font and Size, and the program automatic put the field in the correct size on the report.
>
>
>Nuno Brito
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.