473,666 Members | 2,571 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Text Box Filter using LIKE

Trying to create a filter via a text box where users enter the first
few letters of possible names available. Text box would be connected
to a "LIKE *TEXTBOX*" statement which would filter all records which
match the "LIKE *TEXTBOX*". Sure it wouldn't be hard, but some of the
syntax is tripping me up.

Jeff
Nov 12 '05 #1
2 46404
jeffgeorge wrote:
Trying to create a filter via a text box where users enter the first
few letters of possible names available. Text box would be connected
to a "LIKE *TEXTBOX*" statement which would filter all records which
match the "LIKE *TEXTBOX*". Sure it wouldn't be hard, but some of the
syntax is tripping me up.

Jeff

Jeff,
Where are you doing this?

In a query:
Where [LastName] Like "*" & forms!FormName! ControlName & "*"
The form must be open when the query is run.

On a form to filter the form?

Code the AfterUpdate event of the control:

Me.Filter = "[LastName] Like '*" & [ControlName] & "*'"
Me.FilterOn = True

These filters will return records that have the text anywhere within the
field.
--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
Nov 12 '05 #2
Jeff,

Try putting the following expression in the appropriate field's criteria of the
form's query:

Like "*" & Forms!NameOfYou rForm!NameOfTex tBox & "*"
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com
"jeffgeorge " <ki*******@aol. com> wrote in message
news:4f******** *************** ***@posting.goo gle.com...
Trying to create a filter via a text box where users enter the first
few letters of possible names available. Text box would be connected
to a "LIKE *TEXTBOX*" statement which would filter all records which
match the "LIKE *TEXTBOX*". Sure it wouldn't be hard, but some of the
syntax is tripping me up.

Jeff

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3087
by: Ed | last post by:
------=_NextPart_000_001D_01C34FCC.1D2B5E50 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable There seems to be a significant penalty imposed by the optimizer when = these 3 clauses are uses together. If we use the Full Text Search the penalty = is gone. However, the Full Text Search is not a very good option in my =
9
1848
by: Nathan Sokalski | last post by:
I am trying to do a database search using LIKE using the following code: Private Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click If Page.IsValid Then Dim logictype As String
0
2746
by: Sakharam Phapale | last post by:
Hi All, I am developing my own text editor using RichTextBox control. I don't want to use RichTextBox Undo and Redo functions. Instead of that I want to develop my own algorithm for Undo & Redo, as my application demands it. Because for each word in text, I have associated data and so, require to maintain state of associated data also. Currently, I have developed algorithm which works on each key press. On each key press event, I...
5
1894
by: flash | last post by:
Hi, I am trying to access a text control using a variable name rather than a fixed id. ie I have a text controls called "tx1" "tx2" "tx3" etc. and i want to set the control using something like "id" & variable
3
2385
by: ASP Developer | last post by:
I have a variety of pages that use a master page. For some reason when I attempt to copy any of the label text on the screen it seems to highlight most of the screen randomly and I can't simply copy the text. I can select all text that is inside a control such as a text box. It is only the labels that I can't get a hold of. Any suggestions would be greatly appreciated.
4
2314
by: Michael R | last post by:
I'm using this code to filter a form: Me.Form.Filter = "Remarks Is Null" Me.Form.FilterOn = True What code can I use to filter without ruining the previous, already applied filter? Also, what is the correct syntax to filter using criteria from a control in VBA, for ex. from the control: ..? Thanks very much.
15
2590
by: Briansmi1116 | last post by:
I created two buttons, that filter my form, They filter in different Fields, and if one is filtered, and the other is not there is a certain amount of record, if they are both pushed, then there is less. This works great, but now I want to filter within what is left in the form, without adding the other records. The code I use to filter using my buttons is: Private Sub filter_closed_Click() If filter_closed.Caption = "Filter Closed"...
3
2111
by: receipt24 | last post by:
Hi I am stuck! this will be easy I am sure for you... I am trying to insert additional text to a text box using the after update function in a form! For example: would like to insert HI after entering text... Thanks
0
1719
by: satyasri2test | last post by:
Hi, Can some one provide me the complete example for using FILTER USING option in CREATE FUNCTION (External Scalar) for DB2 LUW 9.5. I have verified the sample given in the SQL Reference Volume2, but that is incomplete. With thanks, satyasri
0
8454
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8363
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8883
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8787
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8561
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4200
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2776
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1778
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.