Hi Mohammed,
First, it's important that you reserve enough digits for the maximum number of bills. Let's say that five digits (99999) is enough. Store the bill no. as a number, for the first this year that will be 200400001. Including all the digits in the year ensures that your program don't need any changes before year 10000.
BillNoText=SUBSTR(TRANSFORM(xx,'@R 9999-99999'),3).
Another solution is to store the year in one field and the bill no in another field, both as integer. InvYear=2004, BillNo=1.
BillNoText=RIGHT(STR(invYear,4),2)+'-'+RIGHT(STR(1e5+BillNo,6),4).
>hi,
>thank you for reply,
>
>that is mean myfield must be character,
>
>i need small code sample about mytext(mean the serial how i can do that),if you can,
>
>and how i can make myresearch when i have 04-0025.
>
>somthing as val(treim(thisform.text1.value)).......
>
>thanks.
>best regards.
>m.qasem