option boxes and reports

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
 
F

Fons Ponsioen

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
 
E

Emma

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
.
.
 
D

Duane Hookom

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top