J
Jeff Monroe
I have a form with navigation buttons (First, Next, Previous, Last
New). I am trying to make them "Smart" by enabling and disabling the
as per the position in the recordset (with the help of a boo
tutorial).
When I try to use the form I get a "Run-time error '13': Typ
mismatch". When I click debug the code that is highlighted is "Se
rstClone = frm.RecordsetClone". Here is a sample of the first part o
the code:
Public Function DisablEnable(frm As Form)
Dim rstClone As ADODB.Recordset
Set rstClone = frm.RecordsetClone
If frm.NewRecord Then
frm!cmdFirst.Enabled = True
frm!cmdNext.Enabled = False
frm!cmdPrevious.Enabled = True
frm!cmdLast.Enabled = True
frm!cmdNew.Enabled = False
Exit Function
End If
....
End Function
The public function is kept in a module (basNavigationButtons) and I a
calling the function in the forms On Current event
=DisablEnable([Form]) ). Lastly, I am using Access 2003.
PS: I have found this same error when using Set rstClone
frm.RecordsetClone, but could not figure out why. I just had to mov
on.
Jeff Monro
New). I am trying to make them "Smart" by enabling and disabling the
as per the position in the recordset (with the help of a boo
tutorial).
When I try to use the form I get a "Run-time error '13': Typ
mismatch". When I click debug the code that is highlighted is "Se
rstClone = frm.RecordsetClone". Here is a sample of the first part o
the code:
Public Function DisablEnable(frm As Form)
Dim rstClone As ADODB.Recordset
Set rstClone = frm.RecordsetClone
If frm.NewRecord Then
frm!cmdFirst.Enabled = True
frm!cmdNext.Enabled = False
frm!cmdPrevious.Enabled = True
frm!cmdLast.Enabled = True
frm!cmdNew.Enabled = False
Exit Function
End If
....
End Function
The public function is kept in a module (basNavigationButtons) and I a
calling the function in the forms On Current event
=DisablEnable([Form]) ). Lastly, I am using Access 2003.
PS: I have found this same error when using Set rstClone
frm.RecordsetClone, but could not figure out why. I just had to mov
on.
Jeff Monro