Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Time 3021

Status
Not open for further replies.

Steven547

Technical User
Sep 15, 2004
165
US
Ok.. I'm looking at anothers code. It's a recordset. He mentioned he was receiving the 3021 error. Anyone help with this? Here is the code:

Private Sub FilesList_Click()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[FileID] = '" & Me![FilesList] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
Form.Refresh

End Sub

On the "me.bookmark" is the value <no current record>


Thoughts?
 
How are ya Steven547 . . .

And this . . . (The code requires [purple]Microsoft DAO 3.6 Object Library[/purple] to run. To [blue]check/install[/blue] the library, in any code window click [blue]Tools[/blue] - [blue]References...[/blue] In the listing find the library and [blue]make sure its checked.[/blue] Then using the up arrow, [purple]push it up as high in priority as it will go[/purple]. Click OK.):
Code:
[blue]   Dim rst As DAO.Recordset
   
   Set rst = Me.RecordsetClone
   
   If rst.BOF Then
      MsgBox "No Records!"
   Else
      rst.FindFirst "[FileID] = '" & Me![FilesList] & "'"
      
      If rst.NoMatch Then
         MsgBox "Record Not Found!"
      Else
         Me.Bookmark = rst.Bookmark
      End If
   EndIf
   
   Set rst = Nothing[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top