Aug 14 2004, 03:21 PM
If i have a field in a database where both numbers and text will be entered
If i have a query setup to do a search, is it possible for a partial amount of text to be entered and still find records with a partial match and display them on screen, are there some symbols you can put in the criteria when creating the query
e.g if i have a name egglestone in the table
can i put egg and it would bring everything to me??
Aug 14 2004, 03:28 PM
Use the following example for the criteria for the text field:
Like [Forms]![YourFormName]![ControlName] & "*"
Where "YourFormName" is the name of the form being referenced ...
And "ControlName" is the name of the control on the form being referenced ...
Aug 14 2004, 03:34 PM
i am confused, am i supposed to be putting that information above into the criteria section when designing the query?
Why would i have to put a form name in, when it was direct through a query.
I tried what i understood to mean
Like [Forms]![rc-plitbl]![RC/PLI] & ""
RC/PLI is the field in rc-plitbl i want to search, when run i got a box asking for parameter value, tried things but then i just get empty records returned to me
Aug 14 2004, 03:38 PM
If you have the query prompting for the value ... use:
Like [Enter Value to Search] & "*"
"Enter Value to Search" should be your prompt text ...
Aug 14 2004, 03:41 PM
yes i got it to work this time.
In testing, i have lee egglestone stored in this field so if i entered the complete name the records containing this were displayed but if i just put egg in the prompt I get nothing back.
I thought this would allow me to type a partial match to whats stored in that field?
Aug 14 2004, 03:44 PM
To return a value in the middle of the text .. you need:
Like "*" & [Enter Value to Search] & "*"
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here