A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query problem, shortening a query can anyone help?



 
 
Thread Tools Display Modes
  #1  
Old September 20th, 2004, 03:37 PM
Sacred
external usenet poster
 
Posts: n/a
Default Query problem, shortening a query can anyone help?

I'm trying to make a query system and want to speed up the way it is used.

Basically I might be wanting a query on a street name. The street name is:

Cherry Tree Drive

I set up the query as normal and have it so I need to type in a street name
before it can find anything. The problem is this can be time consuming and is
relient on 100% correct spelling.
I want it so I can type say

Cher

and it would find

Cherry Tree Drive (and anyother with them matching letters)

I'm not sure how to do this exactly so thought someone here might be able to
help.

Thanks,
Sacred
  #2  
Old September 20th, 2004, 03:47 PM
Allen Browne
external usenet poster
 
Posts: n/a
Default

In the Criteria:
Like "Cher*"

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Sacred" wrote in message
...
I'm trying to make a query system and want to speed up the way it is used.

Basically I might be wanting a query on a street name. The street name is:

Cherry Tree Drive

I set up the query as normal and have it so I need to type in a street
name
before it can find anything. The problem is this can be time consuming and
is
relient on 100% correct spelling.
I want it so I can type say

Cher

and it would find

Cherry Tree Drive (and anyother with them matching letters)

I'm not sure how to do this exactly so thought someone here might be able
to
help.

Thanks,
Sacred



  #3  
Old September 20th, 2004, 03:47 PM
StCyrM
external usenet poster
 
Posts: n/a
Default

Good morning

In the Criteria area of your query, enter the following for the appropriate
field you wish to query on:

Like "*" & [FieldToQuery} & "*"


Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.


I'm trying to make a query system and want to speed up the way it is used.

Basically I might be wanting a query on a street name. The street name is:

Cherry Tree Drive

I set up the query as normal and have it so I need to type in a street name
before it can find anything. The problem is this can be time consuming and is

relient on 100% correct spelling.
I want it so I can type say

Cher

and it would find

Cherry Tree Drive (and anyother with them matching letters)

I'm not sure how to do this exactly so thought someone here might be able to
help.

Thanks,
Sacred








  #4  
Old September 20th, 2004, 03:53 PM
Chad
external usenet poster
 
Posts: n/a
Default

You can use the like operator to do this:

SELECT StreetName
FROM (NameofTable)
WHERE StreetName Like ("*"&[NameoftextBox]&"*");

This way, if you enter Ch in the text box, it will retrun any fields that
contain Ch in them anywhere.

hope this helps,
Chad

"Sacred" wrote:

I'm trying to make a query system and want to speed up the way it is used.

Basically I might be wanting a query on a street name. The street name is:

Cherry Tree Drive

I set up the query as normal and have it so I need to type in a street name
before it can find anything. The problem is this can be time consuming and is
relient on 100% correct spelling.
I want it so I can type say

Cher

and it would find

Cherry Tree Drive (and anyother with them matching letters)

I'm not sure how to do this exactly so thought someone here might be able to
help.

Thanks,
Sacred

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Union Query Problem Bill Sturdevant Running & Setting Up Queries 7 August 5th, 2004 03:37 PM
MailMerge Query Discontinuity Ken Mailmerge 8 July 27th, 2004 05:41 PM
Newbie? Do I use Report or Query John Egan New Users 11 June 28th, 2004 08:31 PM
!Recordset from a parameterized query, as the form's recordset. Problem on sorting... Savvoulidis Iordanis Using Forms 2 June 24th, 2004 08:52 AM
Query Join Problem Tom Running & Setting Up Queries 0 May 31st, 2004 09:54 AM


All times are GMT +1. The time now is 02:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.