Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Access Query a Table Combo Box Column?

Status
Not open for further replies.

JaeBon

Instructor
Jan 31, 2004
26
US
Can Access Query a Table Combo Box Column?

I have an access table called tblFreezerItems. In the table is a column called Location. This Location column is a combo box that looks up items in a table called tblLocation. In the Location Table are the choices: Kitchen, LeftBasement, and RightBasement. When I try to Query the Freezer Items table, it works fine until I try to query using the Location column. Is it possible to query the Freezer table for items in a particular location? The only thing I can determine is that it may not query a combo box column. Thanks for taking time to read my message.
 



Hi,

You'll get a much better response in one of the many MS Access forums, here at Tek-Tips.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
It works.

First, Access questions should be posted in the Access forums so this would be in either
Microsoft: Access Tables and Relationships
or
Microsoft: Access Queries and JET SQL

Second, read:
The Evils of Lookup Fields in Tables

Questions:
What does your tblLocation table look like? What is the Primary Key?
When you created the lookup, you probably used the lookup wizard. If you did this, then did you check or uncheck Hide Primary Key? It doesn't matter, but then you'll see what field to query against.
In your query, your criteria must be on the primary key, not "kitchen, LeftBasement, Rightbasement" words.

"The only thing I can determine is that it may not query a combo box column." Made me smile.
Microsoft is a multi-multi-billion dollar company. Don't think you found a flaw of theirs. They've already thought of it. Look at anything you overlooked.

Also, always post you table structures and code so we know what you're doing.
 
I apologize for posting in the wrong place. Thanks for your responses.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top