Using "Like"

  • Thread starter Thread starter Robert Gillard
  • Start date Start date
R

Robert Gillard

On a form I have an unbound text box [text4], I want to type a letter of the
alphabet into it e.g. "D" and run a query to find all records starting with
that letter.

In the query I have set the criteria to

Like [forms]![mm]![text4] & "*"

but when I run it, it returns all records. If I close the form and run the
query, the Enter Parameter Value box comes up into which I type a start
letter and that works fine. Any suggestions where I am going wrong.

Bob
 
It is possible that you have not moved the Focus away from the TextBox
[text4] and the *value* of the TextBox is still Null. Try making sure the
Focus is moved to another Control so that the value of [text4] is updated
before running the Query.
 
Back
Top