Hi,
I'm curious is there anything i can do such as applying the codes below in a loop rather than what i've used below ? Most of the codes are identical except the cursor name and a condition. Imagine i have 10 cursors. I wouldn't want to replicate the codes 10 times.
strText = ''
SELECT * FROM CurPrint ORDER BY salestype WHERE printLoc1 = .T. into CURSOR CurPrint1
SELECT CurPrint1
SCAN
strText = Thisform.mthTextmerge(strText,item,variant)
ENDSCAN
strText = ''
SELECT * FROM CurPrint ORDER BY salestype WHERE printLoc2= .T. into CURSOR CurPrint2
SELECT CurPrint2
SCAN
strText = Thisform.mthTextmerge(strText,item,variant)
ENDSCAN
Any suggestion ?
Thanks.
I'm curious is there anything i can do such as applying the codes below in a loop rather than what i've used below ? Most of the codes are identical except the cursor name and a condition. Imagine i have 10 cursors. I wouldn't want to replicate the codes 10 times.
strText = ''
SELECT * FROM CurPrint ORDER BY salestype WHERE printLoc1 = .T. into CURSOR CurPrint1
SELECT CurPrint1
SCAN
strText = Thisform.mthTextmerge(strText,item,variant)
ENDSCAN
strText = ''
SELECT * FROM CurPrint ORDER BY salestype WHERE printLoc2= .T. into CURSOR CurPrint2
SELECT CurPrint2
SCAN
strText = Thisform.mthTextmerge(strText,item,variant)
ENDSCAN
Any suggestion ?
Thanks.