I'm using the following code (provided to me long ago on this site...thanks!) and have used it many times to search one form from another pop-up form.
Private Sub Enter_Code_AfterUpdate()
Dim db As DAO.Database, rst As DAO.Recordset
Dim frm As Form, Criteria As String
Set db = CurrentDb()
Set frm = Forms![Film Transfers Data Entry]
Set rst = frm.RecordsetClone
Criteria = "
Private Sub Enter_Code_AfterUpdate()
Dim db As DAO.Database, rst As DAO.Recordset
Dim frm As Form, Criteria As String
Set db = CurrentDb()
Set frm = Forms![Film Transfers Data Entry]
Set rst = frm.RecordsetClone
Criteria = "
Code:
='" & Me![Enter Code] & "'"
rst.FindFirst Criteria
frm.Bookmark = rst.Bookmark
Set rst = Nothing
Set frm = Nothing
Set db = Nothing
DoCmd.Close
End Sub
I have other databases that I've compared it to and can't find the problem. In this case, the form to search is "Film Transfers Data Entry", the information I am seeking is "Code" and the field I'm using in my search form is called "Enter Code". I know the record exists for which I am searching but each time get a response "Run time Error '3021', No Current Record". When I debug, the line highlighted is "frm.Bookmark = rst.Bookmark". I dont think the problem is the code. I think the problem is a database setting itself. Any help would be greatly appreciated!