Trouble with Combo boxes

G

Guest

I am taking a table from an other data base and using it in a new DB. This
table is nothing more than our 70 stores and the 10 regions that each one
falls into. The table is made up of a list of the stores ( unique) and the
regions for the stores acording to alpha order. I create a mew data base and
then put two combo boxes on the form. One is Stores, the other is regions. I
would lik to select a store from this data base and have it bring up the
reagion in the next field. I have used this before in cascading combo boxes,
yet it just does not seem to work. When I fill out a record, I have to select
both the store and the region, I gve a different store and region for every
record, but when I move thru the databse looking at the records in the form
they all have the last store and region in them, not the ones entered. Thanks
in advance.
 
A

Al Camp

Mike,
I think you have this a bit turned around. Since there are only 10
regions and 70 stores, it would be more productive to select a Region first,
and then a Store. Working with a selection from among 10 regions, and then
yielding (approximately) 7 stores to choose from would be a bit easier data
entry.

But, working the way you want... selecting Store then Region, your
actually defining a "unique" value first. There's no need for a second
combo. You can just use a calculated text control to display the Region
associated with the store you selected.

Make cboStore a 2 column combo, bound to your [Store] field, with Store
in the first column and Region in the second.
Place an unbound text control ([Region]) on the form with a ControlSource
of...
=cboStore.Column(1)
Whenever you select a Store, Region will display the appropriate Region.
Since you capture Store to your table, there's no need to capture the
Region... just show it. Given Store, you can always rederive Region in any
subsequent Query, Form, or Report.
 
G

Guest

Thank you that worked great. Now the problem I have is that in the form that
I use to populate records I an using the combo box on this one table. When I
try a report or query I get no results because I am using the table with the
store and region as a place holder also. I am thinking I would use the store
and region from the other table as a holder and use the table that just has
the store and region as a source. Is this correct. Let me put it this way. I
have three tables. One table has all just the stores and the regions for all
the stores. The other table has devices types in the stores, and the last on
is the main table that holds the most records with the store, region and
other info. If I use the last tables Store and region in the query or report
is this going to give me a report on the stores and regions? I hope you
understand.

Al Camp said:
Mike,
I think you have this a bit turned around. Since there are only 10
regions and 70 stores, it would be more productive to select a Region first,
and then a Store. Working with a selection from among 10 regions, and then
yielding (approximately) 7 stores to choose from would be a bit easier data
entry.

But, working the way you want... selecting Store then Region, your
actually defining a "unique" value first. There's no need for a second
combo. You can just use a calculated text control to display the Region
associated with the store you selected.

Make cboStore a 2 column combo, bound to your [Store] field, with Store
in the first column and Region in the second.
Place an unbound text control ([Region]) on the form with a ControlSource
of...
=cboStore.Column(1)
Whenever you select a Store, Region will display the appropriate Region.
Since you capture Store to your table, there's no need to capture the
Region... just show it. Given Store, you can always rederive Region in any
subsequent Query, Form, or Report.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


Mike Busch said:
I am taking a table from an other data base and using it in a new DB. This
table is nothing more than our 70 stores and the 10 regions that each one
falls into. The table is made up of a list of the stores ( unique) and the
regions for the stores acording to alpha order. I create a mew data base
and
then put two combo boxes on the form. One is Stores, the other is regions.
I
would lik to select a store from this data base and have it bring up the
reagion in the next field. I have used this before in cascading combo
boxes,
yet it just does not seem to work. When I fill out a record, I have to
select
both the store and the region, I gve a different store and region for
every
record, but when I move thru the databse looking at the records in the
form
they all have the last store and region in them, not the ones entered.
Thanks
in advance.
 
A

Al Camp

Mike,
First, it's usually best not to "chain" different questions together
within one thread. (Fix one, ask another) They tend to get a bit buried,
and many folks will think it's been answered. Questions that arise directly
from the original post are OK, but others, unrelated to the original post
should be submitted under a completely new post.

You wrote...
"When I try a report or query I get no results
I get no results because I am using the table with the
store and region as a place holder also. (I don't understand what you
mean by "place holder")

Those statements don't give us any information as to your table design,
their relationships, or anything about the queries or reports you are trying
to develop.

Try creating a new post with more information about your tables, and
relationships, and describe ONE "basic" query that you are having difficulty
creating. Also, describe any forms and fields that may be used as a source
of the criteria for that query.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions



Mike Busch said:
Thank you that worked great. Now the problem I have is that in the form
that
I use to populate records I an using the combo box on this one table. When
I
try a report or query I get no results because I am using the table with
the
store and region as a place holder also. I am thinking I would use the
store
and region from the other table as a holder and use the table that just
has
the store and region as a source. Is this correct. Let me put it this way.
I
have three tables. One table has all just the stores and the regions for
all
the stores. The other table has devices types in the stores, and the last
on
is the main table that holds the most records with the store, region and
other info. If I use the last tables Store and region in the query or
report
is this going to give me a report on the stores and regions? I hope you
understand.

Al Camp said:
Mike,
I think you have this a bit turned around. Since there are only 10
regions and 70 stores, it would be more productive to select a Region
first,
and then a Store. Working with a selection from among 10 regions, and
then
yielding (approximately) 7 stores to choose from would be a bit easier
data
entry.

But, working the way you want... selecting Store then Region, your
actually defining a "unique" value first. There's no need for a second
combo. You can just use a calculated text control to display the Region
associated with the store you selected.

Make cboStore a 2 column combo, bound to your [Store] field, with
Store
in the first column and Region in the second.
Place an unbound text control ([Region]) on the form with a
ControlSource
of...
=cboStore.Column(1)
Whenever you select a Store, Region will display the appropriate
Region.
Since you capture Store to your table, there's no need to capture the
Region... just show it. Given Store, you can always rederive Region in
any
subsequent Query, Form, or Report.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


Mike Busch said:
I am taking a table from an other data base and using it in a new DB.
This
table is nothing more than our 70 stores and the 10 regions that each
one
falls into. The table is made up of a list of the stores ( unique) and
the
regions for the stores acording to alpha order. I create a mew data
base
and
then put two combo boxes on the form. One is Stores, the other is
regions.
I
would lik to select a store from this data base and have it bring up
the
reagion in the next field. I have used this before in cascading combo
boxes,
yet it just does not seem to work. When I fill out a record, I have to
select
both the store and the region, I gve a different store and region for
every
record, but when I move thru the databse looking at the records in the
form
they all have the last store and region in them, not the ones entered.
Thanks
in advance.
 

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