Rabu, 01 Agustus 2012

Re: [MS_AccessPros] Error 3021

 

thanks Bob!

--- In MS_Access_Professionals@yahoogroups.com, "Robert Peterson" <bob@...> wrote:
>
> if rst.bof = true and rst.eof = true then ' no records
> lngCount = 0
> end if
>
> Bob Peterson
>
> -----Original Message-----
> From: MS_Access_Professionals@yahoogroups.com
> [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of mrsgoudge
> Sent: Tuesday, July 24, 2012 12:37 PM
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Error 3021
>
> 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
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar