Private Sub Command18_Click()
On Error GoTo Err_Command18_Click
With Me.RecordsetClone
.FindFirst "[ID] >= " & Me.Text19
If .NoMatch Then
MsgBox "Not found"
Else
Me.Bookmark = .Bookmark
End If
End With
Exit_Command18_Click:
Exit Sub
Err_Command18_Click:
MsgBox Err.Description
Resume Exit_Command18_Click
End Sub
this works only in a forms on my table, but i have a subform: tblTest
subform on form Test
error is
you entered an expression that has an invalid reference to the recorsetclone
property
"Arvin Meyer [MVP]" wrote
Every bound form, including subforms, have a recordsource of a table or
query. Build a recordet on that same query and do a FindFirst. Something
like:
With Me.RecordsetClone
.FindFirst "[SomeField] >= """ & Me.MyTextBox & "*"""
If .NoMatch Then
MsgBox "Not found", vbOKOny, "No such record"
Else
Me.Bookmark = .Bookmark
End If
End With
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
Marco said:
How can i go with a button to a specific record ?
I have a form with subform, and if a change the value in subform record
selector, i desire with a button (instead of enter) to go the enter
value
or i put the value in a testbox and go to record in subform.
thx