Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
'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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement