Simple select query problem

  • Thread starter Thread starter Bill
  • Start date Start date
B

Bill

Using access 2002 with a simple database, name, address etc etc. I designed
a query based on a table and with a criteria to enter "Name" If I do not
enter the exact name I get nothing, and access doesn't return an error
saying "record not found" or the like.
So I try a wildcard like the * and enter Br* to retrieve all names starting
with Br and I still get nothing. I cant get the wild card to return anything
in the database

What am I doing wrong?. The query was created from design view.

Any tips helpful

Thanks

Bill
 
Using access 2002 with a simple database, name, address etc etc. I designed
a query based on a table and with a criteria to enter "Name" If I do not
enter the exact name I get nothing, and access doesn't return an error
saying "record not found" or the like.
So I try a wildcard like the * and enter Br* to retrieve all names starting
with Br and I still get nothing. I cant get the wild card to return anything
in the database

What am I doing wrong?. The query was created from design view.

Wildcards such as * are recognized by the LIKE operator, not by the
default = operator. Try a criterion of

LIKE [Enter name:] & "*"

so that the user can type in Br and find Brighton, Brixey or Brogan.

Naturally it won't return an error message if it doesn't find
anything: that's not an error, it's returning exactly what's in the
table (i.e. nothing).
 
John Vinson said:
Using access 2002 with a simple database, name, address etc etc. I designed
a query based on a table and with a criteria to enter "Name" If I do not
enter the exact name I get nothing, and access doesn't return an error
saying "record not found" or the like.
So I try a wildcard like the * and enter Br* to retrieve all names starting
with Br and I still get nothing. I cant get the wild card to return anything
in the database

What am I doing wrong?. The query was created from design view.

Wildcards such as * are recognized by the LIKE operator, not by the
default = operator. Try a criterion of

LIKE [Enter name:] & "*"

so that the user can type in Br and find Brighton, Brixey or Brogan.

Naturally it won't return an error message if it doesn't find
anything: that's not an error, it's returning exactly what's in the
table (i.e. nothing).

Wow that did it. Thanks. I searched the help file and didnt find anything
close to this format. I will look for a way to return a window that says
"record not found" Looks better :-)

Thanks again.
Bill
 
Back
Top