Good morning! I am getting Error 3021 "No current record" with the MoveFirst line of the following code when I try to use Filter by Form. How would I work around this?
Thanks!
Connie
' Provide a record counter for using with custom navigation buttons (when not using
' Access built in navigation)
'http://www.databasedev.co.uk/navigation-record-count.html
Dim rst As DAO.Recordset
Set rst = Me.RecordsetClone
With rst
.MoveFirst
.MoveLast
lngCount = .RecordCount
End With
'Show the result of the record count in the text box (RecordNbr)
If Me.NewRecord Then
Me.RecordNbr = "New" _
& vbNewLine & " OF " _
& vbNewLine & lngCount
Else: Me.RecordNbr = Me.CurrentRecord _
& vbNewLine & " OF " _
& vbNewLine & lngCount
End If
Selasa, 24 Juli 2012
[MS_AccessPros] Error 3021
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar