Try
LTRIM(DisplayVal("A",somast.fcity,somast.fcountry,somast.fstate,somast.fzip),[,])
If you get the same error again than you're not using VFP9.
>I have a report that is using a defined function to display city state and zipcode in a particular format. A particular field on the report header looks like this:
>
>DisplayVal("A",somast.fcity,somast.fcountry,somast.fstate,somast.fzip)
>
>
>I am unable to modify the function because it is part of the project (a vcx) and the boss has not given me the ok to recompile using re-fox. The function displays a leading comma from time to time and I'd like to remove that comma.
>
>so i am limited to making changes on the report.
>I have tried LTRIM(DisplayVal("A",somast.fcity,somast.fcountry,somast.fstate,somast.fzip),1,chr(44))
>
>but that returns an error "too many arguments"
>
>When I test the following it works fine: ? ltrim(',Test',1,chr(44)) it returns 'Test' removing the leading comma correctly.
--sb--