Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SCAN LOOP Goofing up
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01429392
Message ID:
01429414
Views:
57
Set a breakpoint on RECNO("Work") just before it starts the SCAN. The program will break when RECNO() changes and you'll find where it's happening.


>Yes, both tables are ordered. I was doig a SEEK() command with an IF condition.
>
>Here's partial code:
>
>As soon as I SELECT the BATCHN table, the record in the WORK table returns to the record it had been on, although I specifically saw that it was on the second record on the second pass (loop).
>
>
>WITH ThisForm
>	SELECT WORK
>	SCAN	&& FOR WORK.Order_Num = tmpOrders.Order_num
>		SELECT BatchN
>		lcOrderNo =Work.Order_Num
>		lcPart_Num=Work.Part_Num
>			
>		*SELECT BATCHN
>		IF !SEEK(lcOrderNo) && 1st time in to the BATCHN table..
>			* If there is no record yet, make a new one.
>			APPEND BLANK
>			* Put in the data for the first line item.
>
>
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform