Hello,
I currently have a query that takes it's criteria from a form. All works
well except when a name is mis-spelled in the database. My thought was to
try to use the "like" command as part of the critera. My problem is that
when I use it, it finds no records. Need a little help please.
TIA
Steve 5 1471
Steve,
You also want to use wildcards. A '?' represents any 1 character and a '*'
represents one or more characters. They are used like this:
Like "?" & "at" returns cat. eat, fat, hat, mat, ....
Note that the expression only returns 3-letter words because '?' represents
only 1 character!
Like "*" & "at" cat, eat, fat, hat, mat, meat, what, ....
Note that the expression here requires the words to end in 'at' but there
can be any number of letters in front of 'at'
Wildcards can also be used in the middle of an expression or at the end.
Like "s" & "?" & "ar" will return scar, star, ...
Like "s" & "*" & "ar" will return all words beginning with 's' and ending with
'ar'
Like "m" & "?" will return all two-letter words beginning with 'm', ma, me, mi
Like "m" & "*" will return all words begimming with 'm'
to contrast, me will be returmed as well as Massachusetts and Mississippi
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications re******@pcdatasheet.com www.pcdatasheet.com
"Steve" <st***@work.com> wrote in message news:c5**********@news.netins.net... Hello,
I currently have a query that takes it's criteria from a form. All works well except when a name is mis-spelled in the database. My thought was to try to use the "like" command as part of the critera. My problem is that when I use it, it finds no records. Need a little help please.
TIA Steve
I tried the following criteria, Like [forms]![lookup]!["Last" & "*"], with
no luck. Is it even possible use like in this context or am I chasing my
tail? The information was helpful to me for the future, thank you.
Steve
"PC Datasheet" <sp**@nospam.spam> wrote in message
news:j2*****************@newsread3.news.atl.earthl ink.net... Steve,
You also want to use wildcards. A '?' represents any 1 character and a '*' represents one or more characters. They are used like this:
Like "?" & "at" returns cat. eat, fat, hat, mat, .... Note that the expression only returns 3-letter words because '?'
represents only 1 character!
Like "*" & "at" cat, eat, fat, hat, mat, meat, what, .... Note that the expression here requires the words to end in 'at' but
there can be any number of letters in front of 'at'
Wildcards can also be used in the middle of an expression or at the end.
Like "s" & "?" & "ar" will return scar, star, ... Like "s" & "*" & "ar" will return all words beginning with 's' and ending
with 'ar'
Like "m" & "?" will return all two-letter words beginning with 'm', ma,
me, mi Like "m" & "*" will return all words begimming with 'm' to contrast, me will be returmed as well as Massachusetts and Mississippi
-- PC Datasheet Your Resource For Help With Access, Excel And Word Applications re******@pcdatasheet.com www.pcdatasheet.com
"Steve" <st***@work.com> wrote in message
news:c5**********@news.netins.net... Hello,
I currently have a query that takes it's criteria from a form. All
works well except when a name is mis-spelled in the database. My thought was
to try to use the "like" command as part of the critera. My problem is that when I use it, it finds no records. Need a little help please.
TIA Steve
I got it figured out. Thank you very much for the help. Your information
gave me a direction.
Steve
"Steve" <st***@work.com> wrote in message
news:c5**********@news.netins.net... I tried the following criteria, Like [forms]![lookup]!["Last" & "*"], with no luck. Is it even possible use like in this context or am I chasing my tail? The information was helpful to me for the future, thank you.
Steve
"PC Datasheet" <sp**@nospam.spam> wrote in message news:j2*****************@newsread3.news.atl.earthl ink.net... Steve,
You also want to use wildcards. A '?' represents any 1 character and a
'*' represents one or more characters. They are used like this:
Like "?" & "at" returns cat. eat, fat, hat, mat, .... Note that the expression only returns 3-letter words because '?' represents only 1 character!
Like "*" & "at" cat, eat, fat, hat, mat, meat, what, .... Note that the expression here requires the words to end in 'at' but there can be any number of letters in front of 'at'
Wildcards can also be used in the middle of an expression or at the end.
Like "s" & "?" & "ar" will return scar, star, ... Like "s" & "*" & "ar" will return all words beginning with 's' and
ending with 'ar'
Like "m" & "?" will return all two-letter words beginning with 'm', ma, me, mi Like "m" & "*" will return all words begimming with 'm' to contrast, me will be returmed as well as Massachusetts and
Mississippi -- PC Datasheet Your Resource For Help With Access, Excel And Word Applications re******@pcdatasheet.com www.pcdatasheet.com
"Steve" <st***@work.com> wrote in message news:c5**********@news.netins.net... Hello,
I currently have a query that takes it's criteria from a form. All works well except when a name is mis-spelled in the database. My thought was to try to use the "like" command as part of the critera. My problem is
that when I use it, it finds no records. Need a little help please.
TIA Steve
"Steve" <st***@work.com> wrote in message news:c5**********@news.netins.net... I tried the following criteria, Like [forms]![lookup]!["Last" & "*"], with no luck. Is it even possible use like in this context or am I chasing my tail? The information was helpful to me for the future, thank you.
Steve
"PC Datasheet" <sp**@nospam.spam> wrote in message news:j2*****************@newsread3.news.atl.earthl ink.net... Steve,
You also want to use wildcards. A '?' represents any 1 character and a '*' represents one or more characters. They are used like this:
Like "?" & "at" returns cat. eat, fat, hat, mat, .... Note that the expression only returns 3-letter words because '?' represents only 1 character!
Like "*" & "at" cat, eat, fat, hat, mat, meat, what, .... Note that the expression here requires the words to end in 'at' but there can be any number of letters in front of 'at'
Wildcards can also be used in the middle of an expression or at the end.
Like "s" & "?" & "ar" will return scar, star, ... Like "s" & "*" & "ar" will return all words beginning with 's' and ending with 'ar'
Like "m" & "?" will return all two-letter words beginning with 'm', ma, me, mi Like "m" & "*" will return all words begimming with 'm' to contrast, me will be returmed as well as Massachusetts and Mississippi
-- PC Datasheet Your Resource For Help With Access, Excel And Word Applications re******@pcdatasheet.com www.pcdatasheet.com
"Steve" <st***@work.com> wrote in message news:c5**********@news.netins.net... Hello,
I currently have a query that takes it's criteria from a form. All works well except when a name is mis-spelled in the database. My thought was to try to use the "like" command as part of the critera. My problem is that when I use it, it finds no records. Need a little help please.
TIA Steve
Steve,
Your syntax is incorrect!
Try:
Like [forms]![lookup]![Last] & "*"
Steve
PC Datasheet
"Steve" <st***@work.com> wrote in message news:c5**********@news.netins.net... I tried the following criteria, Like [forms]![lookup]!["Last" & "*"], with no luck. Is it even possible use like in this context or am I chasing my tail? The information was helpful to me for the future, thank you.
Steve
"PC Datasheet" <sp**@nospam.spam> wrote in message news:j2*****************@newsread3.news.atl.earthl ink.net... Steve,
You also want to use wildcards. A '?' represents any 1 character and a '*' represents one or more characters. They are used like this:
Like "?" & "at" returns cat. eat, fat, hat, mat, .... Note that the expression only returns 3-letter words because '?' represents only 1 character!
Like "*" & "at" cat, eat, fat, hat, mat, meat, what, .... Note that the expression here requires the words to end in 'at' but there can be any number of letters in front of 'at'
Wildcards can also be used in the middle of an expression or at the end.
Like "s" & "?" & "ar" will return scar, star, ... Like "s" & "*" & "ar" will return all words beginning with 's' and ending with 'ar'
Like "m" & "?" will return all two-letter words beginning with 'm', ma, me, mi Like "m" & "*" will return all words begimming with 'm' to contrast, me will be returmed as well as Massachusetts and Mississippi
-- PC Datasheet Your Resource For Help With Access, Excel And Word Applications re******@pcdatasheet.com www.pcdatasheet.com
"Steve" <st***@work.com> wrote in message news:c5**********@news.netins.net... Hello,
I currently have a query that takes it's criteria from a form. All works well except when a name is mis-spelled in the database. My thought was to try to use the "like" command as part of the critera. My problem is that when I use it, it finds no records. Need a little help please.
TIA Steve
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Andreas Lauffer |
last post by:
I changed from Access97 to AccessXP and I have immense performance
problems.
Details:
- Access XP MDB with Jet 4.0 ( no ADP-Project )
- Linked Tables to SQL-Server 2000 over ODBC
I used...
|
by: WertmanTheMad |
last post by:
Ive been playing with this for a few days and thought I might thow it
out for seggestions.
I have Several Queries that need counts returned
The Queries are Mutually Exclusive meaning whatever...
|
by: Dom Boyce |
last post by:
Hi
First up, I am using MS Access 2002.
I have a database which records analyst rating changes for a list of
companies on a daily basis. Unfortunately, the database has been set
up (by my...
|
by: Jerry Hull |
last post by:
I'm working with a database developed by an untrained person over
several years - and on a network that has recently been upgraded with
a new server installed and MS office upgraded from 2K (I...
|
by: Zlatko Matić |
last post by:
Let's assume that we have a database on some SQL server (let it be MS SQL
Server) and that we want to execute some parameterized query as a
pass.through query. How can we pass parameters to the...
|
by: Greg Strong |
last post by:
Hello All,
Is it better to create a query in DAO where a report has 4 sub-reports
each of whose record source is a query created at runtime and
everything is in 1 MDB file?
From what I've...
|
by: Mikael Janers |
last post by:
Hello!
I have a question that is not realy only C# but I didn't find any better
group...
What is the most common/best way to handle sql queries in C#
1) Should I use stored procedures ? I...
|
by: Scott Ribe |
last post by:
OK, I'm using a pool of worker threads that each have a connection (from my
own software, no PHP or anything like that involved), and a connection is in
a state where all queries fail. Looking back...
|
by: loosecannon_1 |
last post by:
Hello everyone, I am hoping someone can help me with this problem. I
will say up front that I am not a SQL Server DBA, I am a developer. I
have an application that sends about 25 simultaneous...
|
by: google |
last post by:
I am creating a new database for use within our company, that I'd like
to make reasonably secure (short of a true server based solution). The
back-end of a non-server based database seems to be...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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...
|
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...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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,...
|
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...
|
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...
| |