You're missing a "(":
[size="1"][ April 01, 2004, 08:57 PM: Message edited by: Nick Osdale-Popa ][/size]
thank you for your reply, what i don`t understand
after correct the first function Monarch tells me again "Operandentypen"(German) and the cursors stands here:
the 2nd funktion from you works.
Do you can help me, understanding the errormessage ?
Is it mayby the resnr(numeric) is a 7digits filed and there are only 6 digits in starting from the right ?
Thanks for your help so far.
Your original function would not work properly because, as you stated, resnr[/b] is a numeric field and you are trying to use a string/text function on that number -which causes the Operand Error. You first need to convert resnr[/b] to a string using the STR() function, then you can apply the SUBSTR() function accordingly.
The STR() format is such:
Field = Field you want to convert
Chars = number of characters you want to return
Decimal = number of decimals you want to include from your number
Fill = character use to fill in the extra place holders from your number.
My STR() function:
The TRIM() function elimanates all the extra spaces.
I don't know if resnr[/b] contained any decimals, so I used a standard of 2. Also, not knowing the actual length of the field, I used the maximum number of characters to be sure everything was included, otherwise your field may have been truncated.
Hope that explains the process! [img]smile.gif[/img]
[size="1"][ April 04, 2004, 04:47 AM: Message edited by: Nick Osdale-Popa ][/size]