3 choices

G

Guest

Hello,

I have an option group with check boxes on my form that updates a yes/no
field in a table, so the choices the user used to have were check "something
A" or "something B". Now I have to add a third choice of "nothing" to this.
Is there a way to achieve this with my current setup, or do I need to add a
field to my table so that I can have the choices of "something" or "nothing",
and then of "something A" or "something B" if the user choses "something"?

Thank you.
 
G

Guest

Hi Niniel

In most cases you can have as many options in a toggle group as you like.
Say you wanted to change the color of a font when you selected an option you
could use.

Private Sub NinielsToggleGroup_AfterUpdate()
Select Case Me!NinielsToggleGroup
Case 1
Me.NinielsField.ForeColor = vbBlack
Case 2
Me.NinielsField.ForeColor = vbBlue
Case 3
Me.NinielsField.ForeColor = vbRed
Case 4
Me.NinielsField.ForeColor = vbGreen
Case 5
Me.NinielsField.ForeColor = vbSomethingElse
End Select
End Sub

There are only 5 here but you could have more - BUT it would look a bit mad
with too many. - I have just used this for an example.
You can use something like this behind your own group but I dodn't have any
information about what it does. You could post the code and we could have a
look at it if you like.
 
G

Guest

Thank you, Wayne.

My dilemma is, however, that I don't just want to do some formatting, but
that I need to store information in my table, and that the option group's
underlying field is a yes/no field. At the time I posted my question I dimly
remembered something about "triple states", but I have since done some
additional reading, and it appears as if the field can only store a yes or no
value, and nothing else, wh

But maybe I missed something? Do you know a way around this? I would
definitely like to hear about it.
For the time being I've added another yes/no field to my table, and rigged
the option group so that it'll only show the second option group when
particular option is selected.
It works, although it may not be the most efficient or elegant solution.
The only thing that bugs me a bit is that the hidden option group will
always have one option selected even if the group itself remains hidden, ie.
the first option group asks to select "something" or "nothing", and when
"something" was chosen, it's either "something A" or "something B", which
means that even if "nothing" is selected in the first group, the table will
show that either "something A" or "something B" is selected.
But I guess that's the nature of yes/no fields.
 
G

Guest

I read up on triple state checkboxes, but I'm not sure such a setup will
work for me in this case. Why? Because apparently, once a value has been
selected, the field can never go back to Null.
What I am trying to do here is to show publishing options - publish method
1, publish method 2, or don't publish at all. I was thinking that method 1
could be "yes", method 2 "no", and the no publishing option could be "null".
But although one can reasonably assume that once people decide to publish,
they won't later reverse course, one cannot be certain, so if they do change
their minds, a triple state checkbox would not be able to capture that
information anymore.
Or are there ways around it?
 

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