option group

B

Bill H.

I created an option group with two options using "yes no" buttons. Based on
what is clicked (via vba), I write a value to a field in the table.

Here's what I need now. I want neither button to be selected when moving to
another record, except when that record has a value in the field, and then I
want the appropriate button to be selected.

On new records, neither button to be selected.

Thanks.
 
F

fredg

I created an option group with two options using "yes no" buttons. Based on
what is clicked (via vba), I write a value to a field in the table.

Here's what I need now. I want neither button to be selected when moving to
another record, except when that record has a value in the field, and then I
want the appropriate button to be selected.

On new records, neither button to be selected.

Thanks.

Bind that Option Group to a field in the table, which will take care
of both requests.
 
G

Guest

Is this an unbound form,
or at least an unbound control that you are working with?
As long as the default value for that OptionGroup
is not set to anything then it should not default to anything.
When you select the next record
then tell the control to display
the value of the next record
"IF" there is a value present.
It is a little difficult to give an example
to you without seeing what code
you are working with.
Can you present your code?
Are all of the controls being loaded
with values from a recordset
using ADO etc... ?
Or is it a bound form?
 
B

Bill H.

well that sorta worked. :)

I don't really have a field that receives the value of the option group,
because I don't want to have to later remember what a 1 or 2 meant. :)

So I run vba to determine the value of the option group and then write text
into the field "matched" to the option group.

But at least binding them caused the group to be "neutral" on a new record.

--Bill
..
 
F

fredg

well that sorta worked. :)

I don't really have a field that receives the value of the option group,
because I don't want to have to later remember what a 1 or 2 meant. :)

So I run vba to determine the value of the option group and then write text
into the field "matched" to the option group.

But at least binding them caused the group to be "neutral" on a new record.

--Bill
.

No need to 'remember' what 1 or 2 meant (you should not be viewing the
stored data in the table anyway).

Where ever you need to reference the value stored, in a query, Form,
or Report, use an expression.
Assuming 4 options:
=Choose([OptionGroupName],"Best","Good","Bad","N/A")
 

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