option boxes and reports

  • Thread starter Thread starter Emma
  • Start date Start date
E

Emma

Access 97,
I have an option group with 3 options, stored in a field
called "progress". The options have labels on the form.
When I create a report which includes this field, it shows
1, 2, or 3 in the progress box. How do I get it to show
the labels? I don't think there is any direct way of
doing it, but I was hoping for something like creating a
text box whose text depends on the value of the the
progress field. but I can't seem to get the text box to
work. I wanted to type in VB

if progress.value = 1 then
txtprogress.text = "option 1"
else if progress.value = 2 then
txtprogress.text = "option 2"
else progress.value = 3 then
txtprogress.txt - "option 3"
end if
end if

but the .value and .text options are not available. Can
anyone tell me where I've gone wrong and what to do???!!

Thanks
 
The way I have doen that before is in the text box where
you wish to print the option name write:
=IIF([progress] =1,"option 1",iif([progress]=2,"option
2","option 3"))
This way it will print the option title as specified.
Hope this helps.
Fons
 
It worked perfectly. Thanks, you're a star!

-----Original Message-----
The way I have doen that before is in the text box where
you wish to print the option name write:
=IIF([progress] =1,"option 1",iif([progress]=2,"option
2","option 3"))
This way it will print the option title as specified.
Hope this helps.
Fons
-----Original Message-----
Access 97,
I have an option group with 3 options, stored in a field
called "progress". The options have labels on the form.
When I create a report which includes this field, it shows
1, 2, or 3 in the progress box. How do I get it to show
the labels? I don't think there is any direct way of
doing it, but I was hoping for something like creating a
text box whose text depends on the value of the the
progress field. but I can't seem to get the text box to
work. I wanted to type in VB

if progress.value = 1 then
txtprogress.text = "option 1"
else if progress.value = 2 then
txtprogress.text = "option 2"
else progress.value = 3 then
txtprogress.txt - "option 3"
end if
end if

but the .value and .text options are not available. Can
anyone tell me where I've gone wrong and what to do???!!

Thanks
.
.
 
A simple method if your values are 1-3 is
=Choose([Progress],"Option 1", "Option 2", "Option 3")
 
Back
Top