Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Number at mytext
Message
From
05/12/2004 15:56:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
05/12/2004 15:42:11
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00966918
Message ID:
00967014
Views:
20
>hi,
>
>i try as under atmyform i get error message"Table has no index order set "

To use this function, SerialNumber, you have to create the table, and an index on the field Sequence.

>befor a message i can see the result at mytext as 1,not ex.. 0001-04,

Of course, you have to use this in a more complicated expression, as I explained in a previous e-mail.

For example, and for simplicity:
replace DocNumber with "2004-" + padl(SerialNumber("Sequence_1"), 6, "0")
But first, get the function SerialNumber to work.

>
>local lnSelect
>lnSelect = select()
>if used("serialnumber")
>	select serialnumber
>else
>	select 0
>	use serialnumber
>endif
>*set order to "sequence"
>seek padr(tnSequence, len(sequence))
>if not found()
>	append blank
>	replace sequence with tnSequence, nextnum with 1
>*		replace thisform.text1.value with tnSequence, nextnum with 1
>endif
>local lnReturnValue
>if lock()
>	lnReturnValue = nextnum
>	replace nextnum with nextnum + 1
>else
>	lnReturnValue = -1
>endif
>select (lnSelect)
>unlock
>return lnReturnValue
>
>
>thanks .
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