Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GETNEXTMODIFIED with new records
Message
 
To
11/06/1998 17:18:08
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00106948
Message ID:
00107642
Views:
29
>Okay - this is removeqty (addqty is identical except it adds lnqty instead of subtracting it.
>
>LPARAMETERS lseekvalue, lnqty
>
>LOCAL lcOldAlias, ;
>	  lnoldrecno, ;
>	  lcoldnear, ;
>	  lcoldexact, ;
>	  lcoldorder
>
>lnoldrecno = RECNO()
>lcOldAlias = ALIAS()
>lcoldorder = ORDER()
>lcoldnear = SET("NEAR")
>lcoldexact = SET("EXACT")
>SET EXACT ON
>SET NEAR OFF
>WITH thisform.grdpolines
>	SELECT Item_Master
>	SET ORDER TO TAG itemnumber
>	SEEK lseekvalue
>	IF FOUND()
>		SELECT ItemWarehouse
>		SET ORDER TO TAG Itemwhse
>		SEEK lseekvalue+thisform.cbowarehouse.value
>		IF FOUND()
>			IF thisform.chkdropship.value
>				REPLACE Itemwarehouse.dropshiponorder WITH Itemwarehouse.dropshiponorder - lnqty
>			ELSE
>				REPLACE Itemwarehouse.qtyonorder WITH Itemwarehouse.qtyonorder - lnqty
>			ENDIF
>		TABLEUPDATE(.F.)
>		ENDIF
>		SELECT (lcOldAlias)
>		SET ORDER TO TAG &lcoldorder
>		.refresh()
>	ENDIF
>ENDWITH
>SET NEAR &lcoldnear
>SET EXACT &lcoldexact
Bruce,

I think I have it. In your method, you are changing the alias to Item_Master. You only change it back, however, if the value is Found(). Try putting SELECT (lcOldAlias) at the end of the method. Just add the line of code, don't change anything else, and then see what happens.

HTH
Menachem Bazian, CPA
President
BC Consulting Services, Inc.
973-773-7276
Menachem@BazianCentral.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform