I have a simple text box in a 'Tabbed Form' that I would like to use to search on a single field and show all the data from the related record. The code is assigned to the 'AfterUpdate Event'
If I add the search box to the original form it works perfectly, however when I operate the search in the tabbed form it cant find any matches.
Is there something I need to do when working with tabbed froms ?
Code:
Private Sub Text85_AfterUpdate()
If (Text85 & vbNullString) = vbNullString Then Exit Sub
Dim rs As DAO.Recordset
Set rs = Me.RecordsetClone
rs.FindFirst "[ID]=" & Text85
If rs.NoMatch Then
MsgBox "Sorry, no such record '" & Text85 & "' was found.", _
vbOKOnly + vbInformation
Else
Me.Recordset.Bookmark = rs.Bookmark
End If
rs.Close
Text85 = Null
End Sub