I have the following code that I am trying to use to print part labels based on the quantity in the qty field. The code only does the first matching record and then stops. If I remove the FOR..ENDFOR loop the code will cycle through all matching records. I tried using LOOP with no luck. What am I missing?
SCAN ALL FOR TempData.print = .T. .AND. TempData.printed = .F.
Replace TempData.printed WITH .T.
nQty = TempData.qty
cPartno = TempData.partno
cDesc = TempData.desc
FOR x = 1 TO nQty
REPORT FORM \sched\reports\part_label2.frx NOCONSOLE TO PRINTER
ENDFOR
ENDSCAN
Thanks in advance for your help,
Ed
SCAN ALL FOR TempData.print = .T. .AND. TempData.printed = .F.
Replace TempData.printed WITH .T.
nQty = TempData.qty
cPartno = TempData.partno
cDesc = TempData.desc
FOR x = 1 TO nQty
REPORT FORM \sched\reports\part_label2.frx NOCONSOLE TO PRINTER
ENDFOR
ENDSCAN
Thanks in advance for your help,
Ed