Radio Button Values (1 Viewer)

srideout2525

Registered User.
Local time
Today, 13:39
Joined
Mar 4, 2003
Messages
81
On my report I am pulling values from radio buttons: 1, 2, 3 and 4.

How can I assign the numbers values and have them appear on the report:

for example:

1 = Terminal to Terminal
2 = Door to Terminal
3 = Terminal to Door
4 = Door to Door

Do I need another table? to pull these values from? or...any help or suggestions? thx
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 12:39
Joined
Feb 19, 2002
Messages
43,474
There are several ways. My preferred way is to use a table. Then your forms and reports are based on queries that join to the lookup table to obtain the text value. Two other ways are:
1. A case statement in a user defined function:

Code:
Public Function GetTripType(TripTypeCD as Integer) As String
Select Case TripTypeCD
Case 1
    GetTripType = "Terminal to Terminal"
Case 2
    GetTripType = "Door to Terminal" 
Case 3
    GetTripType = "Terminal to Door"
Case 4
    GetTripType = "Door to Door" 
Case Else
    GetTripType = "Error"
End Select
End Function

2. A Choose() function
= Choose([TripTypeCD], "Terminal to Terminal", "Door to Terminal","Terminal to Door", "Door to Door")
Read the help entry for undesirable side effects.
 

Users who are viewing this thread

Top Bottom