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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lif function on reports

Status
Not open for further replies.

noonan1

Technical User
Joined
Feb 20, 2003
Messages
10
Location
IE
I have three check boxes on my form called medium type, you can only choose one of the checkboxes.
If email is checked the value of 1 is entered into the table. If meeting is checked the value of 2 is entered into the table. If phone call is checked the value of 3 is entered into the table.
The problem is that when the I preview the report the number is showing up in the medium type field of the report but I want the name of the medium type to show up, ie if email is selected I dont want the number 1 to show up on the report instead i want email to be stated on the report.I know it involves the lif function but not sure what to do with it. I would appreciate any suggestions you may have, thank you in advance.
 
Are you basing the report on a query or directly from the table?

If a query, change the Field line of the Medium column to :

MediumType: IIF([medium]=1,"E-mail",IIF([Medium]=2,"Meeting","Phone"))

MediumType is just a variable name and can be anything appropriate.

If you are basing your report directly on the table, in the report's Detail section OnFormat event try the following:

Select Case [Medium]
Case is = 1
[Medium] = "E-mail"
Case is = 2
[Medium] = "Meeting"
Case is = 3
[Medium] = "Phone"
End Select

HTH
Lightning
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top