Dear Sir,
U People have always taken me through whenever I have suffered any problem. Sir Right Now I want to append as many records in the same time in the itemmaster table.
I hav ewriteen The following code for it.........
counter=VAL(thisform.pageframe1.page3.text11.Value)
IF thisform.pageframe1.page3.check1.Value=1
vals1=ALLTRIM(thisform.pageframe1.page3.text1.Value)
vals2=thisform.pageframe1.page3.text2.Value
vals3=thisform.pageframe1.page3.text3.Value
vals4=thisform.pageframe1.page3.text4.Value
vals5=thisform.pageframe1.page3.text5.Value
vals6=thisform.pageframe1.page3.text6.Value
vals7=thisform.pageframe1.page3.text7.Value
vals8=thisform.pageframe1.page3.text8.Value
vals9=thisform.pageframe1.page3.text9.Value
vals10=thisform.pageframe1.page3.text10.Value
itdecs1=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals1+"-"+thisform.pageframe1.page3.combo3.Value
itdecs2=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals2+"-"+thisform.pageframe1.page3.combo3.Value
itdecs3=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals3+"-"+thisform.pageframe1.page3.combo3.Value
itdecs4=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals4+"-"+thisform.pageframe1.page3.combo3.Value
itdecs5=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals5+"-"+thisform.pageframe1.page3.combo3.Value
itdecs6=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals6+"-"+thisform.pageframe1.page3.combo3.Value
itdecs7=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals7+"-"+thisform.pageframe1.page3.combo3.Value
itdecs8=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals8+"-"+thisform.pageframe1.page3.combo3.Value
itdecs9=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals9+"-"+thisform.pageframe1.page3.combo3.Value
itdecs10=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals10+"-"+thisform.pageframe1.page3.combo3.Value
SELECT MAX(VAL(alltrim(SUBSTR(itemcode,3)))) as new FROM itemmas WHERE ALLTRIM(SUBSTR(itemcode,1,2))="LA" INTO CURSOR xnew1
SELECT itemmas
FOR REC = 1 TO COUNTER STEP 1
GO BOTTOM
APPEND BLANK
REPLACE itemcode WITH "LA"+ALLTRIM(STR(xnew1.new+1))
REPLACE itemcat WITH "LABEL LAW"
REPLACE itemsubcat WITH "LAW"
REPLACE itemdesc WITH &itemdecs+&rec
REPLACE unitmeasur WITH "PCS"
REPLACE convunit WITH "PCS"
REPLACE convrate WITH 1
REPLACE size WITH &vals+&rec
REPLACE buyername WITH thisform.pageframe1.page3.combo1.Value
REPLACE stylename WITH thisform.pageframe1.page3.combo1.Value
ENDFOR
SELECT ITEMMAS
GO BOTT
BROWSE
MESSAGEBOX("DATA SUCCESSFULLY UPDATED"
ENDIF
within the following code I wanted to get the records from the form objects and saving it to the variables.
Now "rec" is the counter variable in the for loop. What I wanted is as variable incremented the variable say now is
itemdecs1 for rec=1
itemdecs2 for rec=2
.
.
.
itemdecsn for rec=n
and the itemdesc field will be replced by this variable .
same as the case of sizes also.
Again I want to increment the code of the item also.
I hope for a favourable response once again.
Thanx & Regards
Chandan
U People have always taken me through whenever I have suffered any problem. Sir Right Now I want to append as many records in the same time in the itemmaster table.
I hav ewriteen The following code for it.........
counter=VAL(thisform.pageframe1.page3.text11.Value)
IF thisform.pageframe1.page3.check1.Value=1
vals1=ALLTRIM(thisform.pageframe1.page3.text1.Value)
vals2=thisform.pageframe1.page3.text2.Value
vals3=thisform.pageframe1.page3.text3.Value
vals4=thisform.pageframe1.page3.text4.Value
vals5=thisform.pageframe1.page3.text5.Value
vals6=thisform.pageframe1.page3.text6.Value
vals7=thisform.pageframe1.page3.text7.Value
vals8=thisform.pageframe1.page3.text8.Value
vals9=thisform.pageframe1.page3.text9.Value
vals10=thisform.pageframe1.page3.text10.Value
itdecs1=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals1+"-"+thisform.pageframe1.page3.combo3.Value
itdecs2=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals2+"-"+thisform.pageframe1.page3.combo3.Value
itdecs3=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals3+"-"+thisform.pageframe1.page3.combo3.Value
itdecs4=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals4+"-"+thisform.pageframe1.page3.combo3.Value
itdecs5=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals5+"-"+thisform.pageframe1.page3.combo3.Value
itdecs6=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals6+"-"+thisform.pageframe1.page3.combo3.Value
itdecs7=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals7+"-"+thisform.pageframe1.page3.combo3.Value
itdecs8=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals8+"-"+thisform.pageframe1.page3.combo3.Value
itdecs9=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals9+"-"+thisform.pageframe1.page3.combo3.Value
itdecs10=thisform.pageframe1.page3.check1.Caption+" "+thisform.pageframe1.page3.combo1.Value+"-"+thisform.pageframe1.page3.combo2.value+"-"+vals10+"-"+thisform.pageframe1.page3.combo3.Value
SELECT MAX(VAL(alltrim(SUBSTR(itemcode,3)))) as new FROM itemmas WHERE ALLTRIM(SUBSTR(itemcode,1,2))="LA" INTO CURSOR xnew1
SELECT itemmas
FOR REC = 1 TO COUNTER STEP 1
GO BOTTOM
APPEND BLANK
REPLACE itemcode WITH "LA"+ALLTRIM(STR(xnew1.new+1))
REPLACE itemcat WITH "LABEL LAW"
REPLACE itemsubcat WITH "LAW"
REPLACE itemdesc WITH &itemdecs+&rec
REPLACE unitmeasur WITH "PCS"
REPLACE convunit WITH "PCS"
REPLACE convrate WITH 1
REPLACE size WITH &vals+&rec
REPLACE buyername WITH thisform.pageframe1.page3.combo1.Value
REPLACE stylename WITH thisform.pageframe1.page3.combo1.Value
ENDFOR
SELECT ITEMMAS
GO BOTT
BROWSE
MESSAGEBOX("DATA SUCCESSFULLY UPDATED"
ENDIF
within the following code I wanted to get the records from the form objects and saving it to the variables.
Now "rec" is the counter variable in the for loop. What I wanted is as variable incremented the variable say now is
itemdecs1 for rec=1
itemdecs2 for rec=2
.
.
.
itemdecsn for rec=n
and the itemdesc field will be replced by this variable .
same as the case of sizes also.
Again I want to increment the code of the item also.
I hope for a favourable response once again.
Thanx & Regards
Chandan