simple question

  • Thread starter Thread starter BenMax
  • Start date Start date
B

BenMax

Guest
I have a db that stores answers for surveys that were taken. I just want to be able to search for the name of the person that took the survey. For instance if the last name is "maxwell" I want to be able to search for "max" and it will return all the surveys that begin with "max"

Can someone point me in the general direction on how to do this?

Thanks a ton!
 
Instead of using =, use Like and some wildcards:

where YourName Like"*Max*";

If you want to use a parameter query:

Where YourName Like "*""" & Forms!YourForm!YourName & "*""";
 
simple answer

if you have the default Access menu displayed, place the cursor in the name field, do edit=>find and use wildcards: max*
 
Also, if you have a table/query with the names available in separate fields, you can use the Binocular icon on the tool bar, then put in "max" (without the quotes) - then in the qualifiers under the search string, you can choose the search from among "Whole field", "Start of field", or "Any part of field" and apply as you wish. You will see all the records matching in the way you specific, and you don't need an asterisk or the LIKE operator.
 
Thanks very much for your replies. I am starting to get it...sort of.

If I have a form named "SearchByName" and inside that form is a text field named "searchname", how do I make that field search by last name and where does it return it to?
 
Something makes me think he's talking about he wants his database to be able to search for something. So these options arent really helping (cept the first one) Which is what one should do if they want thier users to be able to search for things in that fassion.
 
Yes you are right Rean. I should have been more clear. Thank you.
 
Here, try looking at this sample database i wrote for another topic. It may show you a thing or two.
 

Attachments

Users who are viewing this thread

Back
Top Bottom