Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

option value conversion in report

Status
Not open for further replies.

patrichek

MIS
Nov 18, 2003
632
US
Hi,
I need help with a report.

in my option group i have:

Medicare
Private

when i run my "type of payment" report they show up as 1 and 2. what i want is "medicare" or "private" to show in the report

please? :)
 
When you define the "Type of Payment" field on your report use an IIF statement in the control source for the field, instead of the field name.

=IIF([Type of Payment] = 1,"Medicare","Private")
 
Or use
=Choose([Type Of Payment], "Medicare", "Private")

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Ok, we're on the right track. I'll try to be more clear.

In my report I have the fields:

Type of Payment
First Name
Last Name

and when I run this report I get

John Doe 1
Jane Doe 2

What I want is:

John Doe Medicare
Jane Doe Private

When I use =IIF([Type of Payment] = 1,"Medicare","Private") or the choose statement

It asks me upon opening the report to select Type of Payment and if i put 1 i get all medicare and 2 gives me only private. How can i get both without having the msg box pop up?

thanks!
 
Apparently you didn't spell the name of the field correctly or your report doesn't have the field [Type Of Payment] in its record source.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Duane,
no it doesn't have the record source type of payment, it has a record id which = a number, i want the number (1 and 2) to display the label name in the report, which = medicare and private.
sorry if i'm confusing...

thanks for your responses!
 
What is the field name that is in your report's record source that contains the 1 or 2? When you view the field list, what fields do you see?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
PaymentID is the only listing in the records source
It's from a radio button, that's why it shows the PaymentID and not the label names of the radio buttons. What I need is to somehow make paymentID 1= medicare and paymentID 2 =private.
 
Why would you not mention the field name before? You really confused us when you continually used "Type of Payment".

=Choose([PaymentID], "Medicare", "Private")

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
sry I assumed when i said "option group" it would be understood.
Plus this is my first db so its been a real learning experience!
I thank you immensely for your help! I don't know what i'd do without this forum!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top