Click to See Complete Forum and Search --> : OVAL Question


diego2k
11-19-2002, 10:29 AM
The First Question is .. how can i know the current record number (like if in VB i do a recordset.AbsolutePosition)

the other question is .. what i´m doing wrong in this piece of code ..


if i call this function when the program starts works correctly
but if i move the pointer to other register than the first .. or the last .. programs stop running with this message.

"OPERATION REQUIRES CURRENT RECORD"


Private Sub getPrev ()

if myTable.bof Then
MsgBox " There is no more records ", 48, "INFORMATION"
myTable.movefirst
crrRec = 1
Else
myTable.moveprevious
crrRec = crrRec - 1
End If

ShowRecord '*** Call Sub Show Record *****

End Sub




Private Sub getNext ()

If myTable.eof Then
Beep: Beep
MsgBox " There is no more records ", 48, "INFORMATION"
myTable.movelast
crrRec = myTable.recordcount
Else
myTable.movenext
crrRec = crrRec + 1
End If

ShowRecord '*** Call Sub Show Record *****

End Sub

jmorras
02-17-2003, 09:56 AM
Hi. Diego:

I work in oval and i had found that problem. Then I had Asked for both BOF and EOF.

If Not RstContador.BOF And Not RstContador.EOF Then
RstContador.Movenext
Else
RstContador.movelast
End If


Perhaps too late for you ?? (demasiado tarde la contestación)

Saludos desde España:


Jorge