473,396 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to use any part of the field for a partial match in a query by form.

Fspinelli
I don't know any other way to explain this but:

I have a query by form (queries my customer table) that by entering a few letters of a company's name in the search field will bring up results in the subform below it. So if I enter "Mel" I get all companies that Beginwith the letters "Mel".

The problem is if the company has two or more names to it, my query only works off of the first three characters. How do I get the search query to look up all companies with any part of the string I enter in the search field? Partial match of the letters I put in the search field.

For instance I want to look up companies that have the word "Globa" or even "glo" in it. Only companies that come up are the companies whose names BEGIN with Glo or Global come up. The company I want, say it's "Mega Global Inc." are not pulled. If I were to even place an "Inc." in the search field all companies with "Inc" anywhere in their name should come up.

I would greatly appreciate any assistance and I thank you!
Oct 14 '10 #1
4 16083
nico5038
3,080 Expert 2GB
You should use the LIKE clause with a "*" before and after the search string.

Nic;o)
Oct 14 '10 #2
Thank you! But where do I put it?
Oct 14 '10 #3
nico5038
3,080 Expert 2GB
When you have a query in the WHERE clause, or in a Query By Form just use "*glo*" (without the " ofcourse) in the field.

Nic;o)
Oct 14 '10 #4
NeoPa
32,556 Expert Mod 16PB
FSpinelli:
Thank you! But where do I put it?
Essentially, wherever you currently have something that is like :
Expand|Select|Wrap|Line Numbers
  1. [ControlName] & '*'
As Nico says, this would need to be changed to :
Expand|Select|Wrap|Line Numbers
  1. '*' & [ControlName] & '*'
If it's a '%' instead of a '*', then use that instead of course (ANSI Standards in String Comparisons).
Oct 14 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Mike Cocker | last post by:
Hello, I'm quite weak at PHP, so I was hoping to get some help understanding the below code. First off, I'm trying to create a "query form" that will allow me to display the results on my...
1
by: Tony D. | last post by:
I could really use some help with a problem I am having. I am trying to add a new field to an existing form that combines two tables into one form. In this same databse I have another form that...
1
by: Jim | last post by:
I have a form which is based on a join query. The join relationship is one to many. When a new record is added and the user enters a value for one of the fields in the "many" records, I attempt...
2
by: Christian Staffe | last post by:
Hi, I would like to check for a partial match between an input string and a regular expression using the Regex class in .NET. By partial match, I mean that the input string could not yet be...
2
by: Andrew Chalk | last post by:
I have a customer who wants to SELECT records based on a partial match in a text field. For example, in a list of telephone numbers they want to search for all records that contain the digits '777'...
4
by: wecka | last post by:
Hello All, Does any one know how to use the form filter in Access to provide partial match? When you choose to "form filter," all text boxes will convert to combo boxes where you can choose from...
10
by: FNA access | last post by:
Hello to the world of the wise, I am a CSOM student at TRU. I am trying to design a database to improve my understanding. The problem I am having is with setting up a query. I have a Query...
16
by: vorlonfear | last post by:
I have been working on this for a while now and I wanted to see if someone could assist me. I have 2 tables each with 5 fields. 4 of the fields are 2 character strings, then the final field is the...
0
by: mbedford | last post by:
I'm buildling a form for tracking printer costs. This form will display data from several different tables pulled together by queries. formPrintCost will display: printer information from...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.