Quering a drop down column from a table

B

Brutalius

I am trying to select entries in a table that have "Vancouver" listed in the
column City. I have used the following criteria in the City field:

"Vancouver"

This works when the City column entries in the table are manually entered,
but does not work when City column entries are selected from a drop down list
which references another table. Insteqd, I get a balnk query return.

How do I query columns whose entries are selected from drop down lists from
other tables?
 
B

Brutalius

Sorry, it does not appear to be a problem with drop down menus, as I've
queried other columns with drop down menus and everything works fine.

However, I still can't query the first column in my table. When I do, a
blank query results. Any ideas?
 
J

John Spencer

As a guess, the value being stored when you select from the drop down is
not VANCOUVER. It is probably a number in a table that is associated
with a string value that is Vancouver.

Using lookup fields hides the real data and shows you the associated
data. The problem is that when you filter on the displayed information,
the filter gets applied to the associated field in another table.

Open your table in design view
Select the City field
Click on the lookup(?) tab
Look in the properties and determine what table is being used.

Now, build your query by adding that table to your query. Add the City
field from the lookup table to your query and search against that added
field.

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

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