• Status: Open
  • Priority: Medium
  • Security: Public
  • Views: 16
  • Last Modified:

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.
0
dgravitt
Asked:
dgravitt
  • 2
3 Comments
 
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.
1
 
dgravittAuthor Commented:
Worked great, thanks for the quick response.
0
 
Anders Ebro (Microsoft MVP)Microsoft DeveloperCommented:
Your welcome. Don't forget to close the question, so others don't waste time :)
0

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now