thisform.text1.value=(RIGHT(STR(lnYear),4),2) + '_' + RIGHT(STR(10000+1,5),4))i change it as befor it works,but still if i change my calander i get the same result.
thisform.text1.value=(RIGHT(STR(YEAR(billinfo.billdate),4),2) + '_'+RIGHT(STR(10000+billinfo.billno+1,5),4))thanks.
>lnYear=YEAR(DATE()) >SELECT MAX(billno) from billinfo WHERE YEAR(billinfo.billdate)=lnYear INTO ARRAY laAarray >if _tally=0 > laArray=1 > thisform.text1.value=(RIGHT(STR(lnYear),4),2) + '_'+RIGHT(STR(10000+1,5),4)) >else > thisform.text1.value=(RIGHT(STR(YEAR(billinfo.billdate),4),2) + '_'+RIGHT(STR(10000+billinfo.billno+1,5),4)) >endif >INSERT INTO billinfo(billno,billdate) VALUES (val(right(thisform.text1.Value,4)),DATE())>>hi,
>>SELECT MAX(billno) from billinfo INTO ARRAY laAarray >>thisform.text1.value=(RIGHT(STR(YEAR(billinfo.billdate),4),2) + '_'+RIGHT(STR(10000+billinfo.billno+1,5),4)) >>INSERT INTO billinfo(billno,billdate) VALUES (val(right(thisform.text1.Value,4)),DATE()) >>>>thanks.
>>>>>inyearofbill=2000+VAL(LEFT(thisform.text1.Value,2)) >>>>>inbillno=INT(VAL(SUBSTR(thisform.text1.value,4))) >>>>>IF USED('billinfo') >>>>> SELECT Billinfo >>>>>ELSE >>>>> SELECT 0 >>>>> USE billinfo AGAIN && Billinfo may be used in another work area with another alias, so use AGAIN to be safe >>>>>ENDIF >>>>>LOCATE for YEAR(billdate)=inyearofbill AND billno=inbillno >>>>>IF FOUND() >>>>> thisform.text2.value=name >>>>> . >>>>> . >>>>> . >>>>>ELSE >>>>> =MESSAGEBOX("not found") >>>>>endif >>>>>>>>>>>hi,
>>>>>> >>>>>>inyearofbill=2000+VAL(LEFT(thisform.text1.Value,2)) >>>>>>inbillno=INT(VAL(SUBSTR(thisform.text1.value,4))) >>>>>>SELECT * from billinfo WHERE YEAR(billdate)=inyearofbill AND billno=inbillno INTO CURSOR curbilldata >>>>>>************ >>>>>>LOCATE for YEAR(billdate)=inyearofbill AND billno=inbillno >>>>>>IF FOUND() >>>>>>thisform.text2.value=name >>>>>>. >>>>>>. >>>>>>. >>>>>>ELSE >>>>>>=MESSAGEBOX("not found") >>>>>>endif >>>>>>******************** >>>>>>>>>>>>
>>>>>>>INSERT INTO billinfo(billno,billdate) VALUES (val(right(thisform.text1.Value,4)),DATE()) >>>>>>>>>>>>>>Remember that the value showed in thisform.text1.Value, 04-0001, is ONLY ment to show nicely, it is not the actual billno.
>>>>>>>>INSERT INTO billinfo(billno,billdate) VALUES (thisform.text1.Value,DATE()) >>>>>>>>>>>>>>>>thanks.