Combo Box

  • Thread starter Thread starter Dolphinv4
  • Start date Start date
D

Dolphinv4

Hi,

I'm new to access so this question may sound a little
silly.

I made a combo box but when I choose the value in the
combo box for Form 1, the rest of the form shows the same
value. And if I change for Form 2, the rest also follows.
Why is this so?

Thanks!
Val
 
Dolphinv4 said:
Hi,

I'm new to access so this question may sound a little
silly.

I made a combo box but when I choose the value in the
combo box for Form 1, the rest of the form shows the same
value. And if I change for Form 2, the rest also follows.
Why is this so?

There are two typical uses for a ComboBox on an Access form. As a bound
control to enter data in a particular field where you want to limit the
entries allowed to those in the list (or just to save keystrokes), or as an
unbound control that lets you pick something from the list and then "do
something" with that value.

A common usage for the latter is to run code when the ComboBox is changed to
navigate the form to a specific record that matches the value chosen from
the list. One of the choices in the ComboBox wizard allows you to set this
up, but it is not what ComboBoxes inherantly do.
 
To add to what Rick has already told you, bound simply means that the
ControlSource property of the control refers to a field in the table or
query which is used in the form's Recordsource. Select the control, open the
property sheet then look under the data tab. To be bound, a field name
should be selected. This value selected in the combo will be stored in this
field.
 
Hi,

sorry but it still doesn't work.

at the "control source", when I click on the down arrow,
it doesn't show the fields (because the list is in
another table) I want. so I click on the "..." and I
select the table and then the field i want in the middle
box. However, this still does not work.

Why is it so?

Regards,
val
-----Original Message-----
To add to what Rick has already told you, bound simply means that the
ControlSource property of the control refers to a field in the table or
query which is used in the form's Recordsource. Select the control, open the
property sheet then look under the data tab. To be bound, a field name
should be selected. This value selected in the combo will be stored in this
field.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Hi Rick,

so how do I select the combo box as a "bound" object?

Regards,
Val

.
 
Hi,

it doesn't seem to work. I realise that the field's
control source is linked to the form's control source.
And the form's control source is input as "Table 1" but
my field require inputs from "Table 2". Is it possible?

Regards,
val
-----Original Message-----
To add to what Rick has already told you, bound simply means that the
ControlSource property of the control refers to a field in the table or
query which is used in the form's Recordsource. Select the control, open the
property sheet then look under the data tab. To be bound, a field name
should be selected. This value selected in the combo will be stored in this
field.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Hi Rick,

so how do I select the combo box as a "bound" object?

Regards,
Val

.
 
yes, it's very possible.
let me restate your situation to make sure i understand it: you have a form
with SourceObject set to Table1. you have a combobox control on the form,
and you have the control's ControlSource set to a field in Table1. in the
combobox droplist, you want to select a value from Table2 to save in the
underlying field in Table1.
right so far? okay, in the form design view, do the following:

select the combobox control.
open the Properties box, if it's not already open.
go to Row Source and delete anything you may have on that line.
click the builder button (...) on the right side.
this opens a window that looks like a query design view, and a Show Table
dialog box.
select Table2 from the list, click Add, then click Close.
drag the field (or fields) you want to see in the droplist, onto the QBE
grid.
make sure you include Table2's primary key field.
click File, Close and then click Yes in the dialog box that comes up.
okay, now your RowSource is a SQL statement that pulls data from Table1.

you'll need to check, and possibly alter, the settings of ColumnCount,
ColumnHeads, ColumnWidths, BoundColumn, ListRows, ListWidth and LimitToList.
if you don't understand the purpose or functionality of any of those
settings, click on the line you need help with and press F1. this will take
you directly to the appropriate topic in Access Help.
if you're not familiar with setting up combo boxes, don't be overwhelmed.
the settings are easy to use once you read up on them, and easy to remember
how they work.

hth


Dolphinv4 said:
Hi,

it doesn't seem to work. I realise that the field's
control source is linked to the form's control source.
And the form's control source is input as "Table 1" but
my field require inputs from "Table 2". Is it possible?

Regards,
val
-----Original Message-----
To add to what Rick has already told you, bound simply means that the
ControlSource property of the control refers to a field in the table or
query which is used in the form's Recordsource. Select the control, open the
property sheet then look under the data tab. To be bound, a field name
should be selected. This value selected in the combo will be stored in this
field.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Hi Rick,

so how do I select the combo box as a "bound" object?

Regards,
Val


-----Original Message-----
Hi,

I'm new to access so this question may sound a little
silly.

I made a combo box but when I choose the value in the
combo box for Form 1, the rest of the form shows the same
value. And if I change for Form 2, the rest also follows.
Why is this so?

There are two typical uses for a ComboBox on an Access form. As a bound
control to enter data in a particular field where you want to limit the
entries allowed to those in the list (or just to save keystrokes), or as
an unbound control that lets you pick something from the list and then
"do something" with that value.

A common usage for the latter is to run code when the ComboBox is
changed to navigate the form to a specific record that matches the value
chosen from the list. One of the choices in the ComboBox wizard allows
you to set this up, but it is not what ComboBoxes inherantly do.


.

.
 
Hi,

I feel stupid ... I still can't seem to get it working
properly. I've done exactly you've said and the Row
Source Field shows "SELECT Table2.FirstName FROM Table2
ORDER BY Table.FirstName;". My primary key is FirstName.

Now the combo box shows the correct list
(List1,List2,etc). However, when I choose List1 from the
combo box for Record 1, all other records automatically
shows List1 too. And if I try to change the other
records, all other records including Record 1 changes
too. Why is this so?

thanks,
Val


-----Original Message-----
yes, it's very possible.
let me restate your situation to make sure i understand it: you have a form
with SourceObject set to Table1. you have a combobox control on the form,
and you have the control's ControlSource set to a field in Table1. in the
combobox droplist, you want to select a value from Table2 to save in the
underlying field in Table1.
right so far? okay, in the form design view, do the following:

select the combobox control.
open the Properties box, if it's not already open.
go to Row Source and delete anything you may have on that line.
click the builder button (...) on the right side.
this opens a window that looks like a query design view, and a Show Table
dialog box.
select Table2 from the list, click Add, then click Close.
drag the field (or fields) you want to see in the droplist, onto the QBE
grid.
make sure you include Table2's primary key field.
click File, Close and then click Yes in the dialog box that comes up.
okay, now your RowSource is a SQL statement that pulls data from Table1.

you'll need to check, and possibly alter, the settings of ColumnCount,
ColumnHeads, ColumnWidths, BoundColumn, ListRows, ListWidth and LimitToList.
if you don't understand the purpose or functionality of any of those
settings, click on the line you need help with and press F1. this will take
you directly to the appropriate topic in Access Help.
if you're not familiar with setting up combo boxes, don't be overwhelmed.
the settings are easy to use once you read up on them, and easy to remember
how they work.

hth


Hi,

it doesn't seem to work. I realise that the field's
control source is linked to the form's control source.
And the form's control source is input as "Table 1" but
my field require inputs from "Table 2". Is it possible?

Regards,
val
-----Original Message-----
To add to what Rick has already told you, bound simply means that the
ControlSource property of the control refers to a
field
in the table or
query which is used in the form's Recordsource. Select the control, open the
property sheet then look under the data tab. To be bound, a field name
should be selected. This value selected in the combo will be stored in this
field.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Dolphinv4 wrote:
Hi Rick,

so how do I select the combo box as a "bound" object?

Regards,
Val


-----Original Message-----
Hi,

I'm new to access so this question may sound a little
silly.

I made a combo box but when I choose the value in the
combo box for Form 1, the rest of the form shows
the
same
value. And if I change for Form 2, the rest also follows.
Why is this so?

There are two typical uses for a ComboBox on an Access form. As a bound
control to enter data in a particular field where
you
want to limit the
entries allowed to those in the list (or just to
save
keystrokes), or as
an unbound control that lets you pick something
from
the list and then
"do something" with that value.

A common usage for the latter is to run code when
the
ComboBox is
changed to navigate the form to a specific record that matches the value
chosen from the list. One of the choices in the ComboBox wizard allows
you to set this up, but it is not what ComboBoxes inherantly do.


.

.


.
 
And also,

I did not set anything to the ControlSource for the
Control. If I set a Field (Field1) from Table1 to the
ControlSource, my ControlBox does work, however, The
Field1 changes correspondingly as I choose from
ControlBox. I do not want this.

Thanks,
Val
-----Original Message-----
Hi,

I feel stupid ... I still can't seem to get it working
properly. I've done exactly you've said and the Row
Source Field shows "SELECT Table2.FirstName FROM Table2
ORDER BY Table.FirstName;". My primary key is FirstName.

Now the combo box shows the correct list
(List1,List2,etc). However, when I choose List1 from the
combo box for Record 1, all other records automatically
shows List1 too. And if I try to change the other
records, all other records including Record 1 changes
too. Why is this so?

thanks,
Val


-----Original Message-----
yes, it's very possible.
let me restate your situation to make sure i understand it: you have a form
with SourceObject set to Table1. you have a combobox control on the form,
and you have the control's ControlSource set to a field in Table1. in the
combobox droplist, you want to select a value from Table2 to save in the
underlying field in Table1.
right so far? okay, in the form design view, do the following:

select the combobox control.
open the Properties box, if it's not already open.
go to Row Source and delete anything you may have on that line.
click the builder button (...) on the right side.
this opens a window that looks like a query design
view,
and a Show Table
dialog box.
select Table2 from the list, click Add, then click Close.
drag the field (or fields) you want to see in the droplist, onto the QBE
grid.
make sure you include Table2's primary key field.
click File, Close and then click Yes in the dialog box that comes up.
okay, now your RowSource is a SQL statement that pulls data from Table1.

you'll need to check, and possibly alter, the settings of ColumnCount,
ColumnHeads, ColumnWidths, BoundColumn, ListRows, ListWidth and LimitToList.
if you don't understand the purpose or functionality of any of those
settings, click on the line you need help with and
press
F1. this will take
you directly to the appropriate topic in Access Help.
if you're not familiar with setting up combo boxes, don't be overwhelmed.
the settings are easy to use once you read up on them, and easy to remember
how they work.

hth


Hi,

it doesn't seem to work. I realise that the field's
control source is linked to the form's control source.
And the form's control source is input as "Table 1" but
my field require inputs from "Table 2". Is it possible?

Regards,
val

-----Original Message-----
To add to what Rick has already told you, bound simply
means that the
ControlSource property of the control refers to a field
in the table or
query which is used in the form's Recordsource. Select
the control, open the
property sheet then look under the data tab. To be
bound, a field name
should be selected. This value selected in the combo
will be stored in this
field.

--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to
this newsgroup.

Dolphinv4 wrote:
Hi Rick,

so how do I select the combo box as a "bound" object?

Regards,
Val


-----Original Message-----
"Dolphinv4" <[email protected]>
wrote in message
Hi,

I'm new to access so this question may sound a little
silly.

I made a combo box but when I choose the value
in
.
 
Dolphinv4 said:
Hi,

I feel stupid ... I still can't seem to get it working
properly. I've done exactly you've said and the Row
Source Field shows "SELECT Table2.FirstName FROM Table2
ORDER BY Table.FirstName;". My primary key is FirstName.

Now the combo box shows the correct list
(List1,List2,etc). However, when I choose List1 from the
combo box for Record 1, all other records automatically
shows List1 too. And if I try to change the other
records, all other records including Record 1 changes
too. Why is this so?

thanks,
Val
<snip>
Are the records in continuous forms?

If so this is the way it behaves. You'll need to change the default view to
single form.

Marc
 
This is getting more n more confusing...Marc, do you mean
whether when I look at the records, it shows a single
record or many records? If this is the case, I am looking
at a single record per view.

Regards,
val
 
Dolphinv4 said:
This is getting more n more confusing...Marc, do you mean
whether when I look at the records, it shows a single
record or many records? If this is the case, I am looking
at a single record per view.

Regards,
val
Ok, single record view
The source for the form is? Table1?
The source for the combobox is Table2.
Marc
 
If you are saying that you make a selection in the ComboBox and then as you
navigate to different records you see that same selection no matter what
record you look at then the ComboBox is NOT bound. There is simply no
other explanation that I can think of for that behavior.
 
Back
Top