T
TimH
when I run this code in Access vba97 there is no error; However when i run
the exact same cose in ACCESS2000 I get the run-time error of object
Required (424); does any one have an Idea as to what is wrong?
Private Sub Form_Current()
Dim recClone As Recordset
Dim intNewRecord As Integer
Set recClone = Me.RecordsetClone
intNewRecord = IsNull(Me.PersonID)
If intNewRecord Then
cmdFirst.Enabled = True
cmdNext.Enabled = False
cmdPrev.Enabled = True
cmdLast.Enabled = True
cmdNew.Enabled = False
Exit Sub
End If
cmdNew.Enabled = True 'this is where the error occurs.
If recClone.RecordCount = 0 Then
cmdFirst.Enabled = False
cmdNext.Enabled = False
cmdPrev.Enabled = False
cmdLast.Enabled = False
Else
recClone.Bookmark = Me.Bookmark
recClone.MovePrevious
cmdFirst.Enabled = Not (recClone.BOF)
cmdPrev.Enabled = Not (recClone.BOF)
recClone.MoveNext
recClone.MoveNext
cmdLast.Enabled = Not (recClone.BOF)
cmdNext.Enabled = Not (recClone.BOF)
recClone.MovePrevious
End If
recClone.Close
End Sub
the exact same cose in ACCESS2000 I get the run-time error of object
Required (424); does any one have an Idea as to what is wrong?
Private Sub Form_Current()
Dim recClone As Recordset
Dim intNewRecord As Integer
Set recClone = Me.RecordsetClone
intNewRecord = IsNull(Me.PersonID)
If intNewRecord Then
cmdFirst.Enabled = True
cmdNext.Enabled = False
cmdPrev.Enabled = True
cmdLast.Enabled = True
cmdNew.Enabled = False
Exit Sub
End If
cmdNew.Enabled = True 'this is where the error occurs.
If recClone.RecordCount = 0 Then
cmdFirst.Enabled = False
cmdNext.Enabled = False
cmdPrev.Enabled = False
cmdLast.Enabled = False
Else
recClone.Bookmark = Me.Bookmark
recClone.MovePrevious
cmdFirst.Enabled = Not (recClone.BOF)
cmdPrev.Enabled = Not (recClone.BOF)
recClone.MoveNext
recClone.MoveNext
cmdLast.Enabled = Not (recClone.BOF)
cmdNext.Enabled = Not (recClone.BOF)
recClone.MovePrevious
End If
recClone.Close
End Sub