How do I query on a field that is a pull-down list

  • Thread starter Thread starter MW
  • Start date Start date
M

MW

Help!. I am using Access97. I have created a table for
which some of the fields I have set up to select the input
from a pull down list. The pull down lists are stored in
another table that functions as my lookup table.

My dillema. I am trying to query from the huge database
and work only with certain records. The query doesn't
like some of the fields that I am basing my criteria on,
primarily if the field is from a pull-down list. I keep
getting nothing as my query results, when I know there are
hundreds of records that should be coming up. Is there a
tricky type of way that I need to design my criteria to
get these records?
 
Are you sure your criteria for the drop down list is using the bound data.
You cannot use some other data that is shown in the drop down list, it must
be the bound data. Post your criteria.

Kelvin
 
Help!. I am using Access97. I have created a table for
which some of the fields I have set up to select the input
from a pull down list. The pull down lists are stored in
another table that functions as my lookup table.

My dillema. I am trying to query from the huge database
and work only with certain records. The query doesn't
like some of the fields that I am basing my criteria on,
primarily if the field is from a pull-down list. I keep
getting nothing as my query results, when I know there are
hundreds of records that should be coming up. Is there a
tricky type of way that I need to design my criteria to
get these records?

Exactly. You are yet another victim of Microsoft's misleading,
misdesigned, and throroughly obnoxious so-called "Lookup" wizard
misfeature. (If you gather that I don't like this tool, you're right!)

Your table DOES NOT CONTAIN what you see. It contains an ID in each
field; that basic fact is concealed from your view by the "looked up"
value. If you want a query on the table, you must query *what is
actually there* - the ID numeric value - not what appears to be there.

You can create a Query joining your table to the "lookup" tables and
include the text field rather than the ID, and search this query
rather than the table directly; or you can (and should) create a Form
based on the table. You can put Combo Box controls ("lookups") on this
Form, and use the Combo Box wizard to create combo boxes which will
allow you to *see* the text value, but *search* the actual contents of
your table.
 
Back
Top