Formatting

G

Guest

What is the best way to print a value in a report based on the contents of a
field.

I have a field [Billing Code]
if [Billing Code] = A I want to print "Private"
If [Billing Code] = "WC" I want to print "Wokers Comp"
If [Billing Code] = "NF" I want to print "Auto"

In the past I have used and IIF statement in the query to produce a new
field. But that only works for up to 2 values.
 
D

Douglas J. Steele

You could nest the IIf statements:

IIf([Billing Code] = "A", "Private", IIf([Billing Code] = "WC", "Wokers
Comp", IIf([Billing Code] = "NF","Auto", "Don't Know")))

better, though would be to have a lookup table that contains this
information, and join it to your table.
 

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

Similar Threads


Top