Search box

C

CAM

Hello,

I am using Access 2003/ I have a very simple database, which contains in
the text box in a form a name of a user "Ron Beacon" what I am looking for
is coding to create a search box that will look for "Ron Beacon" using "Ron
Be*" or like "Ron*". I really need to create a search box so the user can
type in the name and press a command button.. Can anyone give me a hand or
point the way via website for an example. Thank you in advance.

Cheers.
 
P

Piet Linden

Hello,

I am using Access 2003/  I have a very simple database, which contains in
the text box in a form a name of a user "Ron Beacon"  what I am lookingfor
is coding to create a search box that will look for "Ron Beacon" using "Ron
Be*" or like "Ron*".  I really need to create a search box so the user can
type in the name and press a command button..  Can anyone give me a hand or
point the way via website for an example.  Thank you in advance.

Cheers.

SELECT *
FROM MyTable
WHERE FullName LIKE Forms!MySearchForm!txtSearchText & "*"

save the query, and then in the command button's click event, open the
query...
DoCmd.OpenQuery "MySearchQuery"...
 
C

CAM

Thanks Piet, I appreicate the tip.

Cheers

Hello,

I am using Access 2003/ I have a very simple database, which contains in
the text box in a form a name of a user "Ron Beacon" what I am looking for
is coding to create a search box that will look for "Ron Beacon" using
"Ron
Be*" or like "Ron*". I really need to create a search box so the user can
type in the name and press a command button.. Can anyone give me a hand or
point the way via website for an example. Thank you in advance.

Cheers.

SELECT *
FROM MyTable
WHERE FullName LIKE Forms!MySearchForm!txtSearchText & "*"

save the query, and then in the command button's click event, open the
query...
DoCmd.OpenQuery "MySearchQuery"...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top