Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number at mytext
Message
From
04/12/2004 15:56:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
04/12/2004 14:37:22
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00966918
Message ID:
00966922
Views:
21
>hi all,
>
>how i can let my bills number serial as under...
>the first bill 01-04, 01 bell number , 04 mean year 2004,
>
>maybe at end of the year i have bills ex.. as 9999-04,
>if year is 05, i need to start with 01-05 etc...

For ordering, it is better to have the year first: 05-0001, etc. (if you think that you will not have more than 9999 bills in one year).

You can get the year with year(date()).

For the other part of the number, you have to save, in a table, what is the next number that you will use. Every time you assign a number, the value in the table has to be incremented.

At the beginning of the year, this number has to be reset, so that it starts at 1 again.
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)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform