Hi Everyone,
Please look at my code. The purpose of the code is to add sales amounts for items purchased on a particular date range. It works fine if the starting date is exactly found, but if the date is a day or so greater then the start date, the initial set will fail and not even look at the rest of the code.
Can you show me how to change this code so the initial set will find a row with a date = or > then the start date?
Thanks.
Emad
Please look at my code. The purpose of the code is to add sales amounts for items purchased on a particular date range. It works fine if the starting date is exactly found, but if the date is a day or so greater then the start date, the initial set will fail and not even look at the rest of the code.
Can you show me how to change this code so the initial set will find a row with a date = or > then the start date?
Thanks.
Emad
Code:
! Jewlery sales for week 1.
!--------------------------
LOC:TotalJewlerySalesWeek1 = 0
ITEPUR:PurchaseDate = LOC:Week1 - 6
Set (ITEPUR:KeyPurchaseDate, ITEPUR:KeyPurchaseDate) !Set pointer to week 3.
Loop !Process all records
Next (StoneItemsPurchased) ! read a record sequentially
If ErrorCode () Or ITEPUR:PurchaseDate > LOC:Week1 |
Then
Break
End
LOC:TotalJewlerySalesWeek1 = LOC:TotalJewlerySalesWeek1 + ITEPUR:AmountPaid
END