473,387 Members | 1,517 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,387 software developers and data experts.

"like" in a query

hi all !

i want to use the "like" function in a query but i want the user to
enter the search variable.
i have tried "like[enter name to search]" but this doesnt return any
results for some reason.
any ideas ???

thanks
brino

Sep 26 '06 #1
5 2367

brino wrote:
hi all !

i want to use the "like" function in a query but i want the user to
enter the search variable.
i have tried "like[enter name to search]" but this doesnt return any
results for some reason.
any ideas ???

thanks
brino
Try Like "*" & [enter name to search] & "*"

This will search for the entered string anywhere in the field...
eg: User enters: jac
Query will return:
Jack
Jacqueline
Jackie
Jacob
Ian Jackson
etc.

Similarly you could use:

Like [enter name to search] & "*"
....to search for names beginning with whatever the user enters
eg: User enters: da
Query will return:
Dave
David
Davina
etc.

Hope this helps! :-)

Sep 26 '06 #2
like [enter name to search]
without the quotes!

Arno R


"brino" <bd*************@yahoo.com.auschreef in bericht news:11*********************@b28g2000cwb.googlegro ups.com...
hi all !

i want to use the "like" function in a query but i want the user to
enter the search variable.
i have tried "like[enter name to search]" but this doesnt return any
results for some reason.
any ideas ???

thanks
brino
Sep 26 '06 #3
That also works providing your users know how to use wildcards, as they
can then enter the * themselves.

Using that method, typing in just: Jac
Would only return people called Jac and not Jack, Jacqueline, Jackie
etc

However, if the user type: jac* or *jac*
It would work in the same way as my examples above.

Just depends on the ability of your users!

Arno R wrote:
like [enter name to search]
without the quotes!

Arno R
"brino" <bd*************@yahoo.com.auschreef in bericht news:11*********************@b28g2000cwb.googlegro ups.com...
hi all !

i want to use the "like" function in a query but i want the user to
enter the search variable.
i have tried "like[enter name to search]" but this doesnt return any
results for some reason.
any ideas ???

thanks
brino
Sep 26 '06 #4
Hi Paul:

That was a good answer. Clear and easy to understand.
For some reason, I am not getting feed back from my questions on the
forum.

Are there some kind of initialtion rights?

I am having trouble with a query that has multiple criteria using the
Like form.
Should this go under a separate topic?

Thanks in advance:
Bill

Sep 26 '06 #5
Hiya Bill,
Yeah, I'd advise you start a new topic, and ensure you give plenty of
info regarding your problem.
If someone CAN answer it, they usually do.
Regards
Paul

Wild Bill wrote:
Hi Paul:

That was a good answer. Clear and easy to understand.
For some reason, I am not getting feed back from my questions on the
forum.

Are there some kind of initialtion rights?

I am having trouble with a query that has multiple criteria using the
Like form.
Should this go under a separate topic?

Thanks in advance:
Bill
Sep 26 '06 #6

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

Similar topics

5
by: NK | last post by:
Hi all, Does anyone know of how I can disable case sensitivity for the LIKE function in SQL? Currently the SQL statement looks like: $query = "SELECT * FROM itrader_games WHERE...
2
by: QueenArenA.com | last post by:
I have a big problems because I have to query a database which contents contains some - ' - characters and obviously the query back with errors. An example is in www.queenarena.com/turbol.php ...
2
by: Dave Smithz | last post by:
Hello there, Summary: How far can you go with SQL Select queries using like clauses with wildcard characters. Can you apply anything like regular expressions? Full details: On a Intranet...
2
by: Big John | last post by:
in Access 2003 I am trying to get sql query to run using a field as input, but I want to input into the field a value that uses the "like" operator to find any value that starts with the value...
1
by: S. van Beek | last post by:
Dear reader, How can I filter a numeric field with Like as criteria in a query. To filter a numeric field with <10 as criteria this will com back with the result of those records for which...
11
by: Bruce Lawrence | last post by:
Ok, I'm baffled... I'm making a query in access 97 between 2 tables. There is a field in both tables called "DWGNO". OPENORD has a record with a DWGNO of "00000012345" DIEDATA has a record...
9
by: Drum2001 | last post by:
Hello All! I am using the following code during an On Click event for a button. It works properly to create a query for a report: Private Sub Command14_Click() If IsNull(Me.Text30) Then ' No...
10
ChaseCox
by: ChaseCox | last post by:
I have a Database Called FalconAnalysis.mdb. The table I am wanting to use is called Generic Material. The Query I want to pass the value into is called Material Query. The field in the query is...
4
by: JPG4 | last post by:
I have tried just about everything that I can think of, so now I turn to you all for help! I have created a form (titled "OAG") with an unbound textbox titled "DOW". I also have a Query that I...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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,...
0
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,...
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...

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.