|
 |
access thread: Wildcard search in Access through a text box
Message #1 by "peter pennells" <ppenn@b...> on Wed, 23 Jan 2002 21:54:13
|
|
Can anybody help me with the following please
I want to have a form with a text box that will receive a wildcard search
and then have the result displayed as a datasheet, either as a sub form or
as another form. I have visited various Access help sites and viewed other
questions on this site but have yet to successfully create what I want.
I think the problem I am having is inputing the data from the text box
into the query correctly.
Many thanks in advance
Peter
Message #2 by "Yehuda Rosenblum" <Yehuda@I...> on Wed, 23 Jan 2002 16:57:27 -0500
|
|
Peter,
When we need to do a wildcard search we query based using a LIKE clause
on the specified data without the wildcard character. If I run into a
problem I design a sample query in Access and then look at the SQL view
for what I am doing wrong.
I hope this helps,
Yehuda
-----Original Message-----
From: peter pennells [mailto:ppenn@b...]
Sent: Wednesday, January 23, 2002 4:54 PM
To: Access
Subject: [access] Wildcard search in Access through a text box
Can anybody help me with the following please
I want to have a form with a text box that will receive a wildcard
search
and then have the result displayed as a datasheet, either as a sub form
or
as another form. I have visited various Access help sites and viewed
other
questions on this site but have yet to successfully create what I want.
I think the problem I am having is inputing the data from the text box
into the query correctly.
Many thanks in advance
Peter
Message #3 by jsaam@m... on Wed, 23 Jan 2002 13:03:26 -0900
|
|
Why not create a Query, add the tables/fields you want to show up in the
datasheet view, and for the Criteria, put in: Like "*" &[Criteria to search
for] & "*" under the Field that you want the query to ask.
Note that you can change the text in the brackets ([...]) to read what ever
you want the dialog box to ask the user or yourself. When you run the
query, a dialog box will appear..
Better yet, if you already have a form with the text box on it, you may be
able to take that query, and put in: LIKE "*" & Forms![Your_form_name].[Text
box name].Text & "*" <-- not sure on the syntax there.
Have fun..
-----Original Message-----
From: peter pennells [mailto:ppenn@b...]
Sent: Wednesday, January 23, 2002 12:54 PM
To: Access
Subject: [access] Wildcard search in Access through a text box
Can anybody help me with the following please
I want to have a form with a text box that will receive a wildcard search
and then have the result displayed as a datasheet, either as a sub form or
as another form. I have visited various Access help sites and viewed other
questions on this site but have yet to successfully create what I want. I
think the problem I am having is inputing the data from the text box
into the query correctly.
Many thanks in advance
Peter
|
|
 |