guys i need recommendation or ideas why im having "obj req" error
this code is used for moving records from one another
there i copied this code from a book so i was surprised when i had the error
remember if you had a suggestion keep it simple :)
this code is used for moving records from one another
Code:
Private Sub Command5_Click()
'first button, disable first and previous
Data1.Recordset.MoveFirst
cmdprevious.Enabled = False
cmdfirst.Enabled = False
cmdnext.Enabled = True
cmdlast.Enabled = True
End Sub
Private Sub Command6_Click()
'previous button
Data1.Recordset.MovePrevious
cmdnext.Enabled = True
cmdlast.Enabled = True
If Data1.Recordset.BOF = True Then
cmdprevious.Enabled = False
cmdfirst.Enabled = False
Data1.Recordset.MoveFirst
End If
End Sub
Private Sub Command7_Click()
'next button
Data1.Recordset.MoveNext
cmdfirst.Enabled = True
cmdprevious.Enabled = True
If Data1.Recordset.EOF = True Then
cmdlast.Enabled = False
cmdnext.Enabled = False
Data1.Recordset.MoveLast
End If
End Sub
Private Sub Command8_Click()
'last button, disable next and last
Data1.Recordset.MoveLast
cmdprevious.Enabled = True
cmdfirst.Enabled = True
cmdnext.Enabled = False
cmdlast.Enabled = False
End Sub
remember if you had a suggestion keep it simple :)