/ i have a two fields ,this two fields is customer code , ship, ship is a
/ optiongroup in this optiongroup you have a two choose ,the two choose is
/ "Over Sea" & "Local",Now i problem is i need auto crea the
/ customer code, if they choose "Over Sea" than you program is auto show
/ "OA001" ,next time they same as choose the "Over Sea" the program will
/ show "OA002" and if they choose "Local" the Program will be auto show
/ "LA001" , so i think ask all people how can i do this auto function
??????
Func NewCCode
Lpara _ol && this be "OA" or "OL"
Local savesel, saveord, newcode
savesel=select()
saveord=tagno()
select customers
set order to custcode descending
* this should go beyond eof() if there is no code beginning with _ol
seek _ol
newcode=_ol+transform(val(subs(custcode,3)),"@L 999")
set orde to saveord
select (savesel)
return newcode
Hope this helps - tricks like this worked fine for me.