Combo boxes

G

Guest

I have a few questions and they pretty much relate to the same thing – combo
boxes in a table. I have a table with combo boxes. In the row source I have
a list that they can choose from and the Bound Column is 0.

Now I am trying to make a query and filter with those combo boxes. So in
the Criteria row I type in Bismarck, run the query and nothing will show up.
So then I put in 1 and then Bismarck will show up. Is there anyway to be
able to filter a query with just putting in Bismarck? Why do you have to put
the value?

I also have a separate table with all our employees, then I put that table
in my main table as a combo box. Then I try to do a query and ascend A to Z
with the employees’ names but it won’t work. I have worked in Access before
but not with combo boxes. Thank you very much for your help.
 
D

Douglas J. Steele

While it may look to you as though you've stored Bismarck in the field, in
actual fact what you've stored there is 1. It's partly because of this
misleading behaviour that most of us recommend not using Lookup Fields (see
http://www.mvps.org/access/lookupfields.htm at "The Access Web" for more
reasons)

In order to be able to search for Bismarck, rather than 1, you'll need to
create a query that joins the two tables, and returns the Description, not
the ID, from the second table.
 
G

Guest

How do I join the tables?

Douglas J. Steele said:
While it may look to you as though you've stored Bismarck in the field, in
actual fact what you've stored there is 1. It's partly because of this
misleading behaviour that most of us recommend not using Lookup Fields (see
http://www.mvps.org/access/lookupfields.htm at "The Access Web" for more
reasons)

In order to be able to search for Bismarck, rather than 1, you'll need to
create a query that joins the two tables, and returns the Description, not
the ID, from the second table.
 
D

Douglas J Steele

Create a new query.

The first thing you'll be asked to do is select the table(s) you want in the
query. Select your main table and the lookup table. When they appear in the
graphic interface, there should be a line joining the tables. If there
isn't, you'll need to join the tables by dragging the field from the main
table on top of the ID field in the lookup table.

Drag the fields you want from the main table down into the grid, and drag
the Description field from the lookup table.

Save the query.
 
G

Guest

Ok, you are probably thinking if I don’t know much about Access why am I
working in it!!

I still don’t know what you are talking about so I will explain my tables.
My access database is for law enforcement vehicles. So I have a table with
the officers names in, table name is Officers. Then I have another table
(Vehicle table) which is my big table with all my other information. And I
have combo boxes in there to limit the data and to also to make the data
consistent. So when they enter the officer’s name in the Vehicle table they
just use a combo box - they get the list of officers and pick a name.

So now I am trying to query by let’s say an officer, but won’t pull up the
right information. And it won’t put the names in ascending order in the
query.

I also would like to group my districts (the town the officers are from).
So in the Vehicle table I have a combo box for the districts with a list of
the districts so they can pick which one they need. But when I try to query
by just one district (town) it won’t work.

And I know how to join tables but I don’t know what the Description field is.

So did I set up my whole database wrong? Do I need to add more tables?
Thanks again for all your help.
 
G

Guest

Ok, you are probably thinking if I don’t know much about Access why am I
working in it!!

I still don’t know what you are talking about so I will explain my tables.
My access database is for law enforcement vehicles. So I have a table with
the officers names in, table name is Officers. Then I have another table
(Vehicle table) which is my big table with all my other information. And I
have combo boxes in there to limit the data and to also to make the data
consistent. So when they enter the officer’s name in the Vehicle table they
just use a combo box - they get the list of officers and pick a name.

So now I am trying to query by let’s say an officer, but won’t pull up the
right information. And it won’t put the names in ascending order in the
query.

I also would like to group my districts (the town the officers are from).
So in the Vehicle table I have a combo box for the districts with a list of
the districts so they can pick which one they need. But when I try to query
by just one district (town) it won’t work.

And I know how to join tables but I don’t know what the Description field is.

So did I set up my whole database wrong? Do I need to add more tables?
Thanks again for all your help.
 

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