field appearance in report

itazev

Registered User.
Local time
Today, 08:01
Joined
Jan 28, 2007
Messages
18
Hey guys!

I got a simple problem I can't solve.

I got I field "SALES_TYPE" (field type is number)

1 <-> Light
2 <-> Master
3 <-> Special
4 <-> Premium

So I want to show in report the words (light, master ...) not the numbers
any idea?

I'd appreciate any help!
 
Something along the lines of:
Add an unbound text box to the report, call it txtSALES_TYPE

In the Detail section of the report use its onformat event.

Place this code in the event

Select case SALES_TYPE.Value
Case 1
Me.txtSALES_TYPE ="Light"
Case 2
Me.txtSALES_TYPE ="Master"
Case 3
Me.txtSALES_TYPE ="Special"
Case 4
Me.txtSALES_TYPE ="Premium"

End Select

You might need to use Case is or put parentheses around the numbers but this should be close.
 
Text box with immediate if as source
Two ways

nested IIf (could be a pain

simple text box source =IIf[SALES_Type]=1,"Light",)
so if 1 then "light" is value of text box

Then another text box psame size and placed directly over top of first

source =IIf[SALES_Type]=2,"Master",) get the idea

Switch visible property off for SALES_Type text box

You could try to create nested IIF but sometime simple is best

L
 
cool budy! worked!

but it seems that I have to add the field to the form and set it visible = false otherwise the form gives an error that the field wasn't found

but it worked great!
chears!
 

Users who are viewing this thread

Back
Top Bottom