Goto record without filter

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
 
A

Allen Browne

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top