I want to find and move to a record by giving the project number of a record (in a textfield).
When I set a breakpoint to the FindFirst-methodcall everything works fine, the record is found. If I do not set a breakpoint however, the RS.Bookmark is the same as the original Me.Bookmark, so nothing changes.
Here is my code:
I hope someone can explain to me, what's going on here :)
When I set a breakpoint to the FindFirst-methodcall everything works fine, the record is found. If I do not set a breakpoint however, the RS.Bookmark is the same as the original Me.Bookmark, so nothing changes.
Here is my code:
Code:
Dim RS As DAO.Recordset
Set RS = Me.RecordsetClone
If Not IsNull(Me![PNr_Searchfield]) Then
' breakpoint here ?!
RS.FindFirst "[Proj]![PNr] = '" & Me![PNr_Searchfield] & "'"
If Not RS.NoMatch Then
Me.Bookmark = RS.Bookmark
End If
End If
RS.Close
Set RS = Nothing
Comment