cCli is the account number of customer
IF nMode == 1
oClienti:gobottom()
cCodeCliente:=StrZero(val(oClienti:numcli)+1,4)
Endif
In one of my programs I need customer-numbers as well.
There is a index on customer-number with the text-format "00000".
As soon I save the data of a new customer,
the index of customer-number is used and adds +1 to the number from the bottom.
The new number is added with saving the new data.
Next using index customer-last again.
Because I still need the data of old customers I don*t delete them
instead I move the data to the bottom
adding "Z_" to the customer lastname ( index ) and "Z" to the
customer number ( index ) like name : "Z_Maier" and number "Z0035"
I can activate the customer again removing the "Z"
both activate and deactivate works on button-action.
regards
Uwe