MS Access Query using a Like statement.

MS Access query issue. I have a form that requires someone to enter an IP address in a field to do a lookup. So I need the query to use that form field. In the table that contains the IP addresses, some of the IP address are preceded by other characters, some do not. I need for the criteria in the query to use something along the lines of, Like "*[forms]![Lookup]![IP]*", but that doesn't work. Is there a way to get the results I'm looking for? I need were the IP address is any part of the field.
dgravittAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
Your query should look like
like "*" & Forms!Lookup!ip & "*"

Open in new window


Note how that expression concatenates to give you the desired expression.
dgravittAuthor Commented:
Worked great, thanks for the quick response.
Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
Your welcome. Don't forget to close the question, so others don't waste time :)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.