Abdul-
Why are you using the Change event and the Text property? The Text property of
a text box exists only when the control has the focus. Try using the control's
After Update event and just refer to Me.Text2.
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Abdul Shakeel
Sent: Thursday, December 01, 2011 10:46 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Filter List Box through Text Box
I am trying to filter list box through my text box as I data change in text box
the code is as following but its not working what am I doing wrong
Private Sub Text2_Change()
Dim strsql As String
strsql = "SELECT ID, EmpName FORM tblName WHERE EmpName Like '*" &
Me.Text2.Text & "*'"
Me.List0.RowSource = strsql
End Sub
Thanks & Regards,
--
Abdul Shakeel
[Non-text portions of this message have been removed]
------------------------------------
Yahoo! Groups Links
Kamis, 01 Desember 2011
RE: [MS_AccessPros] Filter List Box through Text Box
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar