R
Robin Chapple
I am still a beginner using Access 2002 SP3.
I am attempting to format my own field on a form with record number
displayed. I have an unbound field [RecNum] with the code below copied
from one of my older applications.
I get "Runtime error 13 - Type mismatch" at the line marked with
asterisks. Google has not found an example that helps.
Private Sub Form_Current()
Dim rst As Recordset, intCurRec As Integer, _
intTotalRec As Integer
*** Set rst = Me.RecordsetClone***
rst.MoveLast
intCurRec = Me.CurrentRecord
If NewRecord = True Then
intTotalRec = rst.RecordCount + 1
Else
intTotalRec = rst.RecordCount
End If
Me![RecNum] = "Record " & intCurRec & " of " & intTotalRec
End Sub
Thanks,
Robin Chapple
I am attempting to format my own field on a form with record number
displayed. I have an unbound field [RecNum] with the code below copied
from one of my older applications.
I get "Runtime error 13 - Type mismatch" at the line marked with
asterisks. Google has not found an example that helps.
Private Sub Form_Current()
Dim rst As Recordset, intCurRec As Integer, _
intTotalRec As Integer
*** Set rst = Me.RecordsetClone***
rst.MoveLast
intCurRec = Me.CurrentRecord
If NewRecord = True Then
intTotalRec = rst.RecordCount + 1
Else
intTotalRec = rst.RecordCount
End If
Me![RecNum] = "Record " & intCurRec & " of " & intTotalRec
End Sub
Thanks,
Robin Chapple