Reading records into a report and changing the data at runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a simple report that is based on one table. Very simple...but for
one of the fields (Risk_Level), the data is either High, Medium, or Low. For
each record, I want the report to look at the value of Risk_Level and print
"I" for High, "II" for Medium and "III" for Low.

How is this achieved? I know limited VBA. I hope I have explained it well
enough to get somebody to help me.

Thanks in advance!
 
Base your report on a query on the table. In place of using Risk_Level
directly, use it in a calculated field:
Risk: = Switch([Risk_Level] = "Low", "I", [Risk_Level] = "Medium", "II",
[Risk_Level] = "High", "III")
 
Try using this expression as the ControlSource for the TextBox in which you
display the RiskLevel.

= (IIF
([Risk_Level]="High","I",IIF(([Risk_Level]="Medium","II",IIF([Risk_Level]="Low","III","Unknown")))

That's all one statement on one line.

Larry Linson
Microsoft Access MVP
 
That worked great!! Thanks!

Klatuu said:
Base your report on a query on the table. In place of using Risk_Level
directly, use it in a calculated field:
Risk: = Switch([Risk_Level] = "Low", "I", [Risk_Level] = "Medium", "II",
[Risk_Level] = "High", "III")

RatherBeeHome said:
Hello,

I have a simple report that is based on one table. Very simple...but for
one of the fields (Risk_Level), the data is either High, Medium, or Low. For
each record, I want the report to look at the value of Risk_Level and print
"I" for High, "II" for Medium and "III" for Low.

How is this achieved? I know limited VBA. I hope I have explained it well
enough to get somebody to help me.

Thanks in advance!
 

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

Back
Top