Goto record without filter

  • Thread starter Thread starter Redge
  • Start date Start date
R

Redge

Hi all !

I want to open a form with a specific record but without filter.

I know how can do with WhereCondition but my result is limit by filter. I
want goto my record without that.

Bye

Redge
 
Open the form. Then FindFirst the record that you want in the RecordsetClone
of the form:

Dim rs As DAO.Recordset
Dim strWhere As String

DoCmd.OpenForm "MyForm"
strWhere = "SomeField = " & SomeValue
With Forms("MyForm")
Set rs = .RecordsetClone
rs.FindFirst strWhere
If rs.NoMatch Then
MsgBox "Not found."
Else
.Bookmark = rs.Bookmark
End If
Set rs = Nothing
End With
 
Back
Top