G
Glenda
How do I manipulate a report so it prints the option chosen, not the code (#)
chosen?
chosen?
How do I manipulate a report so it prints the option chosen, not the code (#)
chosen?
fredg said:How do I manipulate a report so it prints the option chosen, not the code (#)
chosen?
If you wish to show, in a report, a text value based upon the stored
Option Group number, it's simple enough.
Add an Unbound Control to the report.
Set it's Control source to (if there are, for example, just 3
options):
=IIf([OptionGroupName] = 1,"This Text",IIf([OptionGroupName]= 2,"That
Text",IIf([OptionGroupName] = 3,"Third Text","Nothing Chosen")))
Or... you could use the Choose() function in the Control's Control
Source:
=IIf(IsNull([OptionGroupName]),"Nothing
Selected",Choose([OptionGroupName],"First Text","Second Text","Third
Text","Fourth Text","Fifth Text","etc."))
If you had many more options, then you could use a Select Case
statement in the Repor's Detail Format Event:
Dim strText as String
Select Case OptionGroupName
Case is = 1
strText = "First Text"
Case is = 2
strText = "Second text"
etc.....
Case is = 15
strText = "Fifteenth Text"
Case else
strText = "Nothing Selected"
End Select
[ControlName] = strText