Using "Like"

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
 
V

Van T. Dinh

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top