Solved FINDING A RECORD FROM UNBOUND TEXT BOX

sbaud2003

Member
Local time
Today, 14:11
Joined
Apr 5, 2020
Messages
179
Hello Sir's

I have a forn bounded by a Table Master_tbl in which one of the Field in AC_NO
i want to find a record from aunbound text box (FINDAC) and the code after event i pu is appended below: but the same is not working

Dim rs As DAO.Recordset

If Not IsNull(Me![FINDAC]) Then
Set rs = Me.RecordsetClone
rs.FindFirst "[AC_NO] = '" & Me![FINDAC] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Else
Exit Sub
End If
End Sub
 
if AC_NO is Long Integer:

If Not IsNull(Me![FINDAC]) Then
Set rs = Me.RecordsetClone
rs.FindFirst "[AC_NO] = " & Me![FINDAC]
If Not rs.NoMatch Then
Me.Bookmark = rs.Bookmark
Else
Exit Sub
End If
End Sub
 
hhhhmmm... do you have AC_NO on your Recordsource?
 

Users who are viewing this thread

Back
Top Bottom