Solved FINDING A RECORD FROM UNBOUND TEXT BOX (1 Viewer)

sbaud2003

Member
Local time
Tomorrow, 00:57
Joined
Apr 5, 2020
Messages
178
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
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:27
Joined
May 7, 2009
Messages
19,245
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
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 03:27
Joined
May 7, 2009
Messages
19,245
hhhhmmm... do you have AC_NO on your Recordsource?
 

Users who are viewing this thread

Top Bottom