>Do you mean...
Not really. I mean I would like to know if the VS RadioButton Component has
a way of putting a dot in itself depending on the value of a given field.
When retrieving a record I do not want to have to tell VS to put a dot in
this or that button depending on the value of the Language field, I am
hoping it has the capacity to figure that out for itself. If I have to do
that each time I retrieve or move to a new record it's going to be a lot of
hassle.
Continuing, if I retreive a record to a winform and that record has a field
called language and I have two RadioButtons in a GroupBox labeled English
and Spanish, is VS smart enough to put a dot in the right radio button
depending on what is in the language field or do I have to do it myself?
If you know the answer that would be good. If not, don't feel bad, we all
don't know something, but perhaps you could help me to get an answer from
someone that does.
"Cor" <no*@non.com> wrote in message
news:3f***********************@reader20.wxs.nl...
Woody,
Do you mean
\\\\
If X="S" then
me.radiobutton1.selected = true 'And automatic radiobutton2.selected =
false
else
me.radiobutton2.selected=true
end if
Or
If X="S" then
me.radiobutton1.text ="English"
me.radiobutton1.selected=true
me.radioButton2.text="Spanish"
Else
me.radiobutton1.text="Angli???"
me.radiobutton2.selected=true
me.radiobutton2.text="Espagnol"
end if
////
That is what I can think of very easy and after a while nice readable.
Or do you mean something like this
\\\\\
X is your database item.
Me.rdbEnglish.Checked=Ctype(Instr(X,"E"),Boolean)
me.rdbSpanish.Checked=Ctype(instr(X,"S"),Boolean)
//////
(I hope Herfried does not see this instruction, I always say I hate those
old VB functions like Instr but this one fits exact for this case)
Doing it with a bitwise operator will maybe go too, but makes is again
more unreadable I think.
One of these must do it I think
Cor