Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Record is out of range' when grid scrolls on data entry?
Message
From
03/12/1997 00:31:28
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
'Record is out of range' when grid scrolls on data entry?
Miscellaneous
Thread ID:
00063508
Message ID:
00063508
Views:
100
After more than a month of tesing and debugging, I am back to the same bug and I am going mad. Can someone help to overcome this bug?

I have a grid (in optimistic table buffering) that gives me the error 'Record is out of range' when the grid starts scrolling on data entry. For example, there are 5 rows shown on the grid and when I enter the sixth record, the error comes out. This error appears from a code where I store and restore the record number. The following is the code.

LOCAL i,lnOldArea, ;
lnOldRecNo, ;
luKey, ;
lcOrder,;
lnResult,;
lcExpression

lnResult = 0.00
IF EMPTY(THIS.CalExpr)
return lnResult
ELSE
IF EMPTY(this.RecordSource)
RETURN lnResult
ENDIF

lcExpression= " " + THIS.CalExpr + " "
lnOldArea = SELECT()
SELECT (this.RecordSource)
lnOldRecNo = IIF(EOF(), 0, RECNO())

IF lnOldRecNo <> 0
GO lnOldRecNo
ENDIF
SELECT (lnOldArea)
ENDIF

return lnResult
Next
Reply
Map
View

Click here to load this message in the networking platform