Make a bound option group show a default

  • Thread starter Thread starter Monte Grant
  • Start date Start date
M

Monte Grant

If no option choice was made, the default option is not displayed in the
group, unless the option group is unbound. I prefer bound so I can query
for the values without referring to the form.

I set the default for the table column to the option group default, but for
some reason, this does not get applied when a form is opened. Its like the
data only goes one way, from the group to the table. The values only show
in the group if they were entered throught the group.

If this needs to be coded, how might I do it. Thanks.

Nick
 
Hi Nick

Do you realise the default value is only applied to new records? Are you
opening the form in data entry mode (ie initially positioned at a new
record) or are you perhaps looking at an existing record where the bound
field's value is actually Null?
 
I created a new record and opened the form with the option group, in add
mode. I also set the bound column default to the option group default.
There are 2 option groups in the form, one bound and another not bound. The
bound group displays nothing while the unbound displays the group default.
The bound group should at least reflect the table column default value,
right? If not, how can I get it to read the column and at least show the
default.


Graham Mandeno said:
Hi Nick

Do you realise the default value is only applied to new records? Are you
opening the form in data entry mode (ie initially positioned at a new
record) or are you perhaps looking at an existing record where the bound
field's value is actually Null?

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Monte Grant said:
If no option choice was made, the default option is not displayed in the
group, unless the option group is unbound. I prefer bound so I can query
for the values without referring to the form.

I set the default for the table column to the option group default, but for
some reason, this does not get applied when a form is opened. Its like the
data only goes one way, from the group to the table. The values only show
in the group if they were entered throught the group.

If this needs to be coded, how might I do it. Thanks.

Nick
 
Just a thought:

For the "bound" option group , is the bound column "0" ? If not try
rearranging the row source and making it 0.




Monte Grant said:
I created a new record and opened the form with the option group, in add
mode. I also set the bound column default to the option group default.
There are 2 option groups in the form, one bound and another not bound. The
bound group displays nothing while the unbound displays the group default.
The bound group should at least reflect the table column default value,
right? If not, how can I get it to read the column and at least show the
default.


Graham Mandeno said:
Hi Nick

Do you realise the default value is only applied to new records? Are you
opening the form in data entry mode (ie initially positioned at a new
record) or are you perhaps looking at an existing record where the bound
field's value is actually Null?

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Monte Grant said:
If no option choice was made, the default option is not displayed in the
group, unless the option group is unbound. I prefer bound so I can query
for the values without referring to the form.

I set the default for the table column to the option group default,
but
for
some reason, this does not get applied when a form is opened. Its
like
the
data only goes one way, from the group to the table. The values only show
in the group if they were entered throught the group.

If this needs to be coded, how might I do it. Thanks.

Nick
 
I'll try it, but I had already gone to the table and set all values to 1,
the default. Option group did not read it and change its display. Does it
matter if the field is text or number?



Treebeard said:
Just a thought:

For the "bound" option group , is the bound column "0" ? If not try
rearranging the row source and making it 0.




Monte Grant said:
I created a new record and opened the form with the option group, in add
mode. I also set the bound column default to the option group default.
There are 2 option groups in the form, one bound and another not bound. The
bound group displays nothing while the unbound displays the group default.
The bound group should at least reflect the table column default value,
right? If not, how can I get it to read the column and at least show the
default.


Graham Mandeno said:
Hi Nick

Do you realise the default value is only applied to new records? Are you
opening the form in data entry mode (ie initially positioned at a new
record) or are you perhaps looking at an existing record where the bound
field's value is actually Null?

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

If no option choice was made, the default option is not displayed in the
group, unless the option group is unbound. I prefer bound so I can query
for the values without referring to the form.

I set the default for the table column to the option group default, but
for
some reason, this does not get applied when a form is opened. Its like
the
data only goes one way, from the group to the table. The values
only
show
in the group if they were entered throught the group.

If this needs to be coded, how might I do it. Thanks.

Nick
 
Nevermind. I'm thinking of a combo box, not an option group.

Are you sure that the default value (1) corresponds to the value of one of
the options in the group?
the default. Option group did not read it and change its display. Does it
matter if the field is text or number?

No .You should be able to map to either a text or numeric field. .



Monte Grant said:
I created a new record and opened the form with the option group, in add
mode. I also set the bound column default to the option group default.
There are 2 option groups in the form, one bound and another not bound. The
bound group displays nothing while the unbound displays the group default.
The bound group should at least reflect the table column default value,
right? If not, how can I get it to read the column and at least show the
default.


Graham Mandeno said:
Hi Nick

Do you realise the default value is only applied to new records? Are you
opening the form in data entry mode (ie initially positioned at a new
record) or are you perhaps looking at an existing record where the bound
field's value is actually Null?

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Monte Grant said:
If no option choice was made, the default option is not displayed in the
group, unless the option group is unbound. I prefer bound so I can query
for the values without referring to the form.

I set the default for the table column to the option group default,
but
for
some reason, this does not get applied when a form is opened. Its
like
the
data only goes one way, from the group to the table. The values only show
in the group if they were entered throught the group.

If this needs to be coded, how might I do it. Thanks.

Nick
 
What happens if you use the form to create a new record but DO NOT select a
value from that option group? Does it end up with the default value?

If the option group contains option buttons/checkboxes, do they appear white
or grey when the form opens? Grey indicates a null value, while all white
would indicate a value that is not one of the options.

Are you sure that one of the option/toggle buttons/checkboxes in the option
group has its OptionValue equal to the default value?

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Monte Grant said:
I created a new record and opened the form with the option group, in add
mode. I also set the bound column default to the option group default.
There are 2 option groups in the form, one bound and another not bound. The
bound group displays nothing while the unbound displays the group default.
The bound group should at least reflect the table column default value,
right? If not, how can I get it to read the column and at least show the
default.


Graham Mandeno said:
Hi Nick

Do you realise the default value is only applied to new records? Are you
opening the form in data entry mode (ie initially positioned at a new
record) or are you perhaps looking at an existing record where the bound
field's value is actually Null?

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Monte Grant said:
If no option choice was made, the default option is not displayed in the
group, unless the option group is unbound. I prefer bound so I can query
for the values without referring to the form.

I set the default for the table column to the option group default,
but
for
some reason, this does not get applied when a form is opened. Its
like
the
data only goes one way, from the group to the table. The values only show
in the group if they were entered throught the group.

If this needs to be coded, how might I do it. Thanks.

Nick
 
Okay, I found it. The subform containing the option group contains records
in a many table that did not yet have a record created. That control would
never be used until a record was created anyway. I don't know why the other
records weren't showing, but they are now. Thanks for helping get the
gears turning.



Graham Mandeno said:
What happens if you use the form to create a new record but DO NOT select a
value from that option group? Does it end up with the default value?

If the option group contains option buttons/checkboxes, do they appear white
or grey when the form opens? Grey indicates a null value, while all white
would indicate a value that is not one of the options.

Are you sure that one of the option/toggle buttons/checkboxes in the option
group has its OptionValue equal to the default value?

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Monte Grant said:
I created a new record and opened the form with the option group, in add
mode. I also set the bound column default to the option group default.
There are 2 option groups in the form, one bound and another not bound. The
bound group displays nothing while the unbound displays the group default.
The bound group should at least reflect the table column default value,
right? If not, how can I get it to read the column and at least show the
default.


Graham Mandeno said:
Hi Nick

Do you realise the default value is only applied to new records? Are you
opening the form in data entry mode (ie initially positioned at a new
record) or are you perhaps looking at an existing record where the bound
field's value is actually Null?

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

If no option choice was made, the default option is not displayed in the
group, unless the option group is unbound. I prefer bound so I can query
for the values without referring to the form.

I set the default for the table column to the option group default, but
for
some reason, this does not get applied when a form is opened. Its like
the
data only goes one way, from the group to the table. The values
only
show
in the group if they were entered throught the group.

If this needs to be coded, how might I do it. Thanks.

Nick
 
Back
Top