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
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