A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Option Group values converted to Text String values in reports



 
 
Thread Tools Display Modes
  #1  
Old May 18th, 2004, 02:21 PM
Fons Ponsioen
external usenet poster
 
Posts: n/a
Default Option Group values converted to Text String values in reports

The following line is correct.
=IIF (OptionValue = 1,"Hardware",IIF(OptionValue =
2,"Software","Other"))
All on one line.
I suspect that your "OptionValue" may not be a numeric
value but rather a text entry. If so you may want to try:
=IIF (OptionValue = "1","Hardware",IIF(OptionValue =
"2","Software","Other")).
(with quotes around the 1 and the 2 just as shown.
Give this a try.
Hope it helps.
Fons
-----Original Message-----
I placed the line in the control source of the Option

Group's field but it only prints out Other. The field's
results are only 2 options (Hardware or Software) I used
Other in the example in case some of my groups contain
more than just 2 options.
When I removed the reference to Other from the expression

The report printed nothing.

I also noticed ther was not an Iff before the Other. I

think I'm missing the boat somewhere.
.
Hi.

I guess you need to conver these for a report or Form?
The easiest may be:
=IIF (OptionValue = 1,"Hardware",IIF(OptionValue =
2,"Software","Other"))
all of this on one line.
Hope this helps.
Fons
-----Original Message-----
I have several option groups in my database that I need

to convert the stored numeric values to the Text they
represent in the reports I write. Example: Option Value
(1) = Hardware, Option Value (2) = Software, OPtion Value
(3) = Other

  #2  
Old May 18th, 2004, 10:50 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default Option Group values converted to Text String values in reports

If the values are consecutive, low numeric values (ie 1,2,3,..) then
consider using the Choose() function
=Choose([FieldValue],"Hardware", "Software", "Other")

--
Duane Hookom
MS Access MVP
--

"Fons Ponsioen" wrote in message
...
The following line is correct.
=IIF (OptionValue = 1,"Hardware",IIF(OptionValue =
2,"Software","Other"))
All on one line.
I suspect that your "OptionValue" may not be a numeric
value but rather a text entry. If so you may want to try:
=IIF (OptionValue = "1","Hardware",IIF(OptionValue =
"2","Software","Other")).
(with quotes around the 1 and the 2 just as shown.
Give this a try.
Hope it helps.
Fons
-----Original Message-----
I placed the line in the control source of the Option

Group's field but it only prints out Other. The field's
results are only 2 options (Hardware or Software) I used
Other in the example in case some of my groups contain
more than just 2 options.
When I removed the reference to Other from the expression

The report printed nothing.

I also noticed ther was not an Iff before the Other. I

think I'm missing the boat somewhere.
.
Hi.

I guess you need to conver these for a report or Form?
The easiest may be:
=IIF (OptionValue = 1,"Hardware",IIF(OptionValue =
2,"Software","Other"))
all of this on one line.
Hope this helps.
Fons
-----Original Message-----
I have several option groups in my database that I need

to convert the stored numeric values to the Text they
represent in the reports I write. Example: Option Value
(1) = Hardware, Option Value (2) = Software, OPtion Value
(3) = Other



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:52 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.