Using the “Like” command when referencing forms in queries

mtairhead

Registered User.
Local time
Today, 15:28
Joined
Oct 17, 2003
Messages
138
I set a query to look for data in (Let’s call it) “field1” with the expression =“Cat”
That means that the query returns only the records that contain only the word “Cat” within field1. This I know….

I also know that if I change the expression to Like “*Cat*” it will return all records that contain the word cat, whether it is the only word in the field or not.

This is what I need help with: The query I’m designing refers to a field in another form. Basically the criteria for field1 is:
=Forms![English Words Filters only Words]![Word]
This works out great, if I want the records that contain only one word (Whatever word is currently being displayed on the “English Words Filters only Words” form).

What I would like is if I could do this:
Like “*Forms![English Words Filters only Words]![Word]*”

Do you know what I mean when I write this? I want the query to return results LIKE the word being displayed in the referenced form. (With words/letters before or after or both included)

How do I do it? Access seems to be actually looking for the phrase/words: Forms![English Words Filters only Words]![Word]

Instead of referencing the form!

What do I do?
 
Your syntax is incorrect.

Like “*" & Forms![English Words Filters only Words]![Word] & "*”
 
Pat Hartman said:
Your syntax is incorrect.

Like “*" & Forms![English Words Filters only Words]![Word] & "*”

I knew it was probably something as simple as that! Thank you, it works!
 

Users who are viewing this thread

Back
Top Bottom