473,385 Members | 2,015 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,385 software developers and data experts.

Searching for words out of older in Access

So basically, what I have is a bunch of words in one memo field, for
example:

dog cat cowboy tree flower

To search it, this is the code I have now.

' Check for LIKE Last Name
If Me.txtLastName > "" Then
varWhere = varWhere & "[LastName] LIKE """ & Me.txtLastName & "*" * "
AND "
End If

The only problem is what I search for needs to be "in order", for
example, if I search for dog, I'll get the table. But, if I seach for
tree, I won't because tree was not place first. Can you please help me?
Thanks a lot!
Reply With Quote

May 16 '06 #1
6 1235
I guess you need something like this:

If Me.txtLastName > "" Then
varWhere = "[LastName] LIKE *" & Me.txtLastName & "*"
End If

Arno R

<yo***********@gmail.com> schreef in bericht news:11**********************@i39g2000cwa.googlegr oups.com...
So basically, what I have is a bunch of words in one memo field, for
example:

dog cat cowboy tree flower

To search it, this is the code I have now.

' Check for LIKE Last Name
If Me.txtLastName > "" Then
varWhere = varWhere & "[LastName] LIKE """ & Me.txtLastName & "*" * "
AND "
End If

The only problem is what I search for needs to be "in order", for
example, if I search for dog, I'll get the table. But, if I seach for
tree, I won't because tree was not place first. Can you please help me?
Thanks a lot!
Reply With Quote

May 16 '06 #2
This code does not work.

May 16 '06 #3
* yo***********@gmail.com:
So basically, what I have is a bunch of words in one memo field, for
example:

dog cat cowboy tree flower

To search it, this is the code I have now.

' Check for LIKE Last Name
If Me.txtLastName > "" Then
varWhere = varWhere & "[LastName] LIKE """ & Me.txtLastName & "*" * "
AND "
End If

The only problem is what I search for needs to be "in order", for
example, if I search for dog, I'll get the table. But, if I seach for
tree, I won't because tree was not place first. Can you please help me?
Thanks a lot!
Reply With Quote


You haven't provided much information so I suspect this is going to get
you some results that you don't want. But, it should get "tree".

' Check for LIKE Last Name
If Me.txtLastName > "" Then
varWhere = varWhere & "[LastName] LIKE ""*" & Me.txtLastName & "*"" "
End If

If you had both boy and cowboy in the field and you search for boy,
you'd get both. This might do better.

' Check for LIKE Last Name
If Me.txtLastName > "" Then
varWhere = varWhere & "[LastName] LIKE """ & Me.txtLastName & _
" *"" OR [LastName] LIKE ""* " & Me.txtLastName & "*"""
End If
--
Randy Harris
tech at promail dot com
I'm pretty sure I know everything that I can remember.
May 16 '06 #4
yo***********@gmail.com wrote in news:1147817129.901123.305520
@i39g2000cwa.googlegroups.com:
This code does not work.


Perhaps, you should look for some paid help. I am guessing our whole group
is sorry and embarrassed for wasting your time.

--
Lyle Fairfield
May 17 '06 #5
Thanks a lot Randy. Sorry for the rude reply. Didn't mean. it.

May 17 '06 #6
Actually, would there be a way I can search for multiple terms, out of
order.

Like, so I can search for is a case like:

cat dog bob john whatever

If I search "john bob" I would get that entry?

Thanks.

May 17 '06 #7

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

Similar topics

31
by: Brynn | last post by:
I want to thank the person that sent the nasty messages to my contact.asp test page ... you have inspired me !!! I have now added a bad_words filter both to my JSValidation script (going up on...
4
by: Michi | last post by:
I was wondering what the best solution is for making large numbers of TEXT (or BLOB?) fields searchable. For example, if I have a forum, what is the best way to be able to search for specific...
1
by: Robert Oschler | last post by:
I read a while back that MySQL will only use one index per query. (If this is not so, please tell me and point me to a doc that gives a good explanation of MySQL's current index usage policy). ...
9
by: Jack-of-all-traits | last post by:
I have certain words, or groups of words (4 or less) input in my fields in Access 2002 xp pro atmosphere. The data is essentially in the tables., so what I want to do is get access with the...
1
by: thehumantrashcan | last post by:
Hi, This is the first database I have ever created, so please bear with me. I've created a simple database with 1 column and about 80,000 rows. In each row is a word (basically a dictionary...
7
by: pbd22 | last post by:
Hi. I am somewhat new to this and would like some advice. I want to search my xml file using "keyword" search and return results based on "proximity matching" - in other words, since the search...
15
by: Gigs_ | last post by:
Hi all! I have text file (english-croatian dictionary) with words in it in alphabetical order. This file contains 179999 words in this format: english word: croatian word I want to make...
17
by: Neil | last post by:
A client of mine likes some of the new bells and whistles in Access 2007, and is thinking about converting our A03 format MDB to an A07 format file. However, while some of the users have A07, many...
17
by: Razii | last post by:
This is specifically regarding U++ which is C++ libraries and IDE (please don't whine whether its on or off topic. Right click on the thread and click on ignore instead of wasting time). This is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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: 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
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.