General information
Category:
Coding, syntax & commands
Title:
'Record is out of range' when grid scrolls on data entry?
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only