G
Guest
How do I alter the option value to return text?
How do I alter the option value to return text?
fredg said:How do I alter the option value to return text?
An Option Group returns a number value.
You can display a text in place of the number by using an unbound
control, in your report, or on a form:
=Choose([OptionGroupName],"First Text","Second Text", "Third Text")
The above will exchange the 1, 2, or 3 number value with the
appropriate text.
You could also use an IIF() statement:
=IIf([OptionGroupName] = 1,"First Text",
IIf([OptionGroupName]=2,"Second Text","Third Text"))
fredg said:How do I alter the option value to return text?
An Option Group returns a number value.
You can display a text in place of the number by using an unbound
control, in your report, or on a form:
=Choose([OptionGroupName],"First Text","Second Text", "Third Text")
The above will exchange the 1, 2, or 3 number value with the
appropriate text.
You could also use an IIF() statement:
=IIf([OptionGroupName] = 1,"First Text",
IIf([OptionGroupName]=2,"Second Text","Third Text"))
j1eggert said:I am sorry for my ignorance, but these code options you have provided are not
yielding any results. Where do I enter the first code you provided? And,
likewise the second code. Do I enter the code in the AfterUpdate in the
option group properties?
fredg said:How do I alter the option value to return text?
An Option Group returns a number value.
You can display a text in place of the number by using an unbound
control, in your report, or on a form:
=Choose([OptionGroupName],"First Text","Second Text", "Third Text")
The above will exchange the 1, 2, or 3 number value with the
appropriate text.
You could also use an IIF() statement:
=IIf([OptionGroupName] = 1,"First Text",
IIf([OptionGroupName]=2,"Second Text","Third Text"))
Klatuu said:You only need one of the lines of code provided. They all accomplish the
same thing; however, I believe that Fredg's Choose method is the very best.
Where you put it depends on where you want to see it. It could go in the
After Update of the option group to put it in a text box:
Me.MyText Box =Choose([OptionGroupName],"First Text","Second Text", "Third
Text")
j1eggert said:I am sorry for my ignorance, but these code options you have provided are not
yielding any results. Where do I enter the first code you provided? And,
likewise the second code. Do I enter the code in the AfterUpdate in the
option group properties?
fredg said:On Wed, 6 Jul 2005 07:51:01 -0700, j1eggert wrote:
How do I alter the option value to return text?
An Option Group returns a number value.
You can display a text in place of the number by using an unbound
control, in your report, or on a form:
=Choose([OptionGroupName],"First Text","Second Text", "Third Text")
The above will exchange the 1, 2, or 3 number value with the
appropriate text.
You could also use an IIF() statement:
=IIf([OptionGroupName] = 1,"First Text",
IIf([OptionGroupName]=2,"Second Text","Third Text"))
j1eggert said:Does this mean I need to create a text box calle Me.MyTextBox on the form? I
am not sure I am understanding.
Klatuu said:You only need one of the lines of code provided. They all accomplish the
same thing; however, I believe that Fredg's Choose method is the very best.
Where you put it depends on where you want to see it. It could go in the
After Update of the option group to put it in a text box:
Me.MyText Box =Choose([OptionGroupName],"First Text","Second Text", "Third
Text")
j1eggert said:I am sorry for my ignorance, but these code options you have provided are not
yielding any results. Where do I enter the first code you provided? And,
likewise the second code. Do I enter the code in the AfterUpdate in the
option group properties?
:
On Wed, 6 Jul 2005 07:51:01 -0700, j1eggert wrote:
How do I alter the option value to return text?
An Option Group returns a number value.
You can display a text in place of the number by using an unbound
control, in your report, or on a form:
=Choose([OptionGroupName],"First Text","Second Text", "Third Text")
The above will exchange the 1, 2, or 3 number value with the
appropriate text.
You could also use an IIF() statement:
=IIf([OptionGroupName] = 1,"First Text",
IIf([OptionGroupName]=2,"Second Text","Third Text"))
Klatuu said:It doesn't have to be names that. You can substitute your own name for it.
What, exactly are you trying to do? Where do you want this text to show up?
j1eggert said:Does this mean I need to create a text box calle Me.MyTextBox on the form? I
am not sure I am understanding.
Klatuu said:You only need one of the lines of code provided. They all accomplish the
same thing; however, I believe that Fredg's Choose method is the very best.
Where you put it depends on where you want to see it. It could go in the
After Update of the option group to put it in a text box:
Me.MyText Box =Choose([OptionGroupName],"First Text","Second Text", "Third
Text")
:
I am sorry for my ignorance, but these code options you have provided are not
yielding any results. Where do I enter the first code you provided? And,
likewise the second code. Do I enter the code in the AfterUpdate in the
option group properties?
:
On Wed, 6 Jul 2005 07:51:01 -0700, j1eggert wrote:
How do I alter the option value to return text?
An Option Group returns a number value.
You can display a text in place of the number by using an unbound
control, in your report, or on a form:
=Choose([OptionGroupName],"First Text","Second Text", "Third Text")
The above will exchange the 1, 2, or 3 number value with the
appropriate text.
You could also use an IIF() statement:
=IIf([OptionGroupName] = 1,"First Text",
IIf([OptionGroupName]=2,"Second Text","Third Text"))
j1eggert said:Here are the specifics:
I have a form that has two option groups. The form clears itself after you
have entered the appropriate fields and pressed Enter. I want the radio
buttons in the option group to fill in the fields in the table rows with the
names on the labels, for each radio button, instead of a whole number. I hope
this helps.
Klatuu said:It doesn't have to be names that. You can substitute your own name for it.
What, exactly are you trying to do? Where do you want this text to show up?
j1eggert said:Does this mean I need to create a text box calle Me.MyTextBox on the form? I
am not sure I am understanding.
:
You only need one of the lines of code provided. They all accomplish the
same thing; however, I believe that Fredg's Choose method is the very best.
Where you put it depends on where you want to see it. It could go in the
After Update of the option group to put it in a text box:
Me.MyText Box =Choose([OptionGroupName],"First Text","Second Text", "Third
Text")
:
I am sorry for my ignorance, but these code options you have provided are not
yielding any results. Where do I enter the first code you provided? And,
likewise the second code. Do I enter the code in the AfterUpdate in the
option group properties?
:
On Wed, 6 Jul 2005 07:51:01 -0700, j1eggert wrote:
How do I alter the option value to return text?
An Option Group returns a number value.
You can display a text in place of the number by using an unbound
control, in your report, or on a form:
=Choose([OptionGroupName],"First Text","Second Text", "Third Text")
The above will exchange the 1, 2, or 3 number value with the
appropriate text.
You could also use an IIF() statement:
=IIf([OptionGroupName] = 1,"First Text",
IIf([OptionGroupName]=2,"Second Text","Third Text"))
Klatuu said:Okay, one other question I should have asked, Is the form a bound form or an
unbound form? This will make a difference in how we do this.
j1eggert said:Here are the specifics:
I have a form that has two option groups. The form clears itself after you
have entered the appropriate fields and pressed Enter. I want the radio
buttons in the option group to fill in the fields in the table rows with the
names on the labels, for each radio button, instead of a whole number. I hope
this helps.
Klatuu said:It doesn't have to be names that. You can substitute your own name for it.
What, exactly are you trying to do? Where do you want this text to show up?
:
Does this mean I need to create a text box calle Me.MyTextBox on the form? I
am not sure I am understanding.
:
You only need one of the lines of code provided. They all accomplish the
same thing; however, I believe that Fredg's Choose method is the very best.
Where you put it depends on where you want to see it. It could go in the
After Update of the option group to put it in a text box:
Me.MyText Box =Choose([OptionGroupName],"First Text","Second Text", "Third
Text")
:
I am sorry for my ignorance, but these code options you have provided are not
yielding any results. Where do I enter the first code you provided? And,
likewise the second code. Do I enter the code in the AfterUpdate in the
option group properties?
:
On Wed, 6 Jul 2005 07:51:01 -0700, j1eggert wrote:
How do I alter the option value to return text?
An Option Group returns a number value.
You can display a text in place of the number by using an unbound
control, in your report, or on a form:
=Choose([OptionGroupName],"First Text","Second Text", "Third Text")
The above will exchange the 1, 2, or 3 number value with the
appropriate text.
You could also use an IIF() statement:
=IIf([OptionGroupName] = 1,"First Text",
IIf([OptionGroupName]=2,"Second Text","Third Text"))
j1eggert said:Actually, with the help of a coworker, we were able to figure it out. We
created a query, which solved the problem. Thanks for your help.
James Eggert
Klatuu said:Okay, one other question I should have asked, Is the form a bound form or an
unbound form? This will make a difference in how we do this.
j1eggert said:Here are the specifics:
I have a form that has two option groups. The form clears itself after you
have entered the appropriate fields and pressed Enter. I want the radio
buttons in the option group to fill in the fields in the table rows with the
names on the labels, for each radio button, instead of a whole number. I hope
this helps.
:
It doesn't have to be names that. You can substitute your own name for it.
What, exactly are you trying to do? Where do you want this text to show up?
:
Does this mean I need to create a text box calle Me.MyTextBox on the form? I
am not sure I am understanding.
:
You only need one of the lines of code provided. They all accomplish the
same thing; however, I believe that Fredg's Choose method is the very best.
Where you put it depends on where you want to see it. It could go in the
After Update of the option group to put it in a text box:
Me.MyText Box =Choose([OptionGroupName],"First Text","Second Text", "Third
Text")
:
I am sorry for my ignorance, but these code options you have provided are not
yielding any results. Where do I enter the first code you provided? And,
likewise the second code. Do I enter the code in the AfterUpdate in the
option group properties?
:
On Wed, 6 Jul 2005 07:51:01 -0700, j1eggert wrote:
How do I alter the option value to return text?
An Option Group returns a number value.
You can display a text in place of the number by using an unbound
control, in your report, or on a form:
=Choose([OptionGroupName],"First Text","Second Text", "Third Text")
The above will exchange the 1, 2, or 3 number value with the
appropriate text.
You could also use an IIF() statement:
=IIf([OptionGroupName] = 1,"First Text",
IIf([OptionGroupName]=2,"Second Text","Third Text"))
Jan said:Gosh, just when I was about to get an answer to my question... please finish
the answer.. my form is bound to my table. The table doesn't have to have the
text, the number value is okay, but when I create my report, I'd like the
report to display the actual text as the number value won't mean anything to
a committee. Thank you!!!
j1eggert said:Actually, with the help of a coworker, we were able to figure it out. We
created a query, which solved the problem. Thanks for your help.
James Eggert
Klatuu said:Okay, one other question I should have asked, Is the form a bound form or an
unbound form? This will make a difference in how we do this.
:
Here are the specifics:
I have a form that has two option groups. The form clears itself after you
have entered the appropriate fields and pressed Enter. I want the radio
buttons in the option group to fill in the fields in the table rows with the
names on the labels, for each radio button, instead of a whole number. I hope
this helps.
:
It doesn't have to be names that. You can substitute your own name for it.
What, exactly are you trying to do? Where do you want this text to show up?
:
Does this mean I need to create a text box calle Me.MyTextBox on the form? I
am not sure I am understanding.
:
You only need one of the lines of code provided. They all accomplish the
same thing; however, I believe that Fredg's Choose method is the very best.
Where you put it depends on where you want to see it. It could go in the
After Update of the option group to put it in a text box:
Me.MyText Box =Choose([OptionGroupName],"First Text","Second Text", "Third
Text")
:
I am sorry for my ignorance, but these code options you have provided are not
yielding any results. Where do I enter the first code you provided? And,
likewise the second code. Do I enter the code in the AfterUpdate in the
option group properties?
:
On Wed, 6 Jul 2005 07:51:01 -0700, j1eggert wrote:
How do I alter the option value to return text?
An Option Group returns a number value.
You can display a text in place of the number by using an unbound
control, in your report, or on a form:
=Choose([OptionGroupName],"First Text","Second Text", "Third Text")
The above will exchange the 1, 2, or 3 number value with the
appropriate text.
You could also use an IIF() statement:
=IIf([OptionGroupName] = 1,"First Text",
IIf([OptionGroupName]=2,"Second Text","Third Text"))