>Hmmm, I checked that the length of the passed value is 4, though I only type three chars. I have MaxLenght property set to 4, but I do not see in the code where I add spaces at the end.
>
>I guess I have to fix my form's code just to make sure I always pass 4 chars and not less.
I often have problems with extra spaces (from a TextBox) causing unexpected results, so I regularly apply alltrim().
It looks as if you have the opposite problem; you might want to consider applying padr() to get a fixed size.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)