hi
i can't delete my first and my last record what should i do ?
it gives Run Time error 3021 "No current record"
and when i click on debug it point me to "
MyRS.Delete "
i usually open a 13-field table
vb
Private Sub cmdDelete_Click()
MyRS.Delete
MyRS.MoveNext
Call Reload
End Sub
also sometimes (usually when i wanna move between records) it points me to "
txt(i).Text = MyRS(i) & "" "
and this is Sub Reload
vb
Public Sub Reload()
On Error GoTo 1
For i = 0 To MyRS.Fields.Count - 1
txt(i).Text = MyRS(i) & ""
Next i
TPrice.Text = txt(9).Text
1:
If Err.Number = 3021 Then
Exit Sub
End If
End Sub
and variables
vb
Dim MyDB As Database
Dim MyRS As Recordset