Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append via scan
Message
De
28/02/2005 05:36:38
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 7
Database:
Oracle
Divers
Thread ID:
00991093
Message ID:
00991120
Vues:
23
hi,
i try ,i insert 2 bills ,take same billno=1.
thanks.
>>hi,
>>i get syntax error
>>goto lnRecno
>>thanks.
>
>Mahammed,
>Replace row "nRecno = recno()"
>with "lnRecno = recno()"
>
>>
>>>> all the code under
>>>>
>>>
>>>local lnRecno
>>>
>>>SELECT MAX(billno) from mstr INTO ARRAY laAarray
>>>thisform.text1.value=(RIGHT(STR(YEAR(mstr.datein),4),2) + '_'+RIGHT(STR(10000+mstr.billno+1,5),4))
>>>
>>>Select 1
>>>use mstr
>>>
>>>GO BOTTOM   &&& to save Last RecordNo
>>>
>IF EOF()   && empty table mstr.dbf
>   lnRecno = 0
>ELSE
>   lnRecno = recno()   &&& here
>ENDIF
>>>Append From Dbf('temp')
>>>goto lnRecno + 1 && if dbf('temp') contains no records, this line will fail, so you must check * that before you append in the preceding line
>>>scan rest && without REST, you scan all records!
>>>     replace w1 with thisform.text14.value, w2 with thisform.text16.value, dis with *          thisform.text27.value, net with thisform.text28.value
>>>     replace billno with val(right (thisform.text1.Value,4)), datein with date()
>>>endscan
>>>
>>>  With thisform.grid1
>>>   .recordsource = ''
>>>   Select temp
>>>   .recordsource = 'temp'
>>>   thisform.text1.SetFocus
>>>   thisform.refresh
>>>  endwith
>>>
>>>  with thisform.Grid1
>>> .Recordsource = .Recordsource
>>>endwith
>>>>
>>>>  ********************************************
>>>>  thisform.text1.value=space(10)
>>>>  thisform.text2.value=ctod("  /  /  ")
>>>>  thisform.text3.value=space(10)
>>>>  thisform.text4.value=space(10)
>>>>  thisform.text5.value=space(10)
>>>>  thisform.text6.value=0
>>>>  thisform.text7.value=0
>>>>  thisform.text8.value=0
>>>>  thisform.text10.value=0
>>>>SELECT mstr
>>>>SELECT MAX(billno) from mstr INTO ARRAY laAarray
>>>>thisform.text1.value=(RIGHT(STR(YEAR(mstr.datein),4),2) + '_'+RIGHT(STR(10000+laAarray[1]+1,5),4))
>>>>
>>>>
>>>>With thisform.grid1
>>>>   .recordsource = ''
>>>>   Select temp
>>>>   delete all
>>>>   .recordsource = 'temp'
>>>>   thisform.text1.SetFocus
>>>>   thisform.refresh
>>>>  endwith
>>>>
>>>>
>>>>   thisform.grid1.refresh
>>>>
>>>>thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform