Good morning All,
First, I want to Thank Ken Hig for helping me on using CASE SELECT for something similar yesterday.
I have a report with a field RCSN, This can have several different values in it. Based on these values I want an unbound text field "RCModel" to display certain values:
1 - If Length of RCSN = 9 then RCModel = Symbol S-24
2 - If RCSN = 832505 then RCModel = Cisco A/B
3 - If RCSN = 838692 then RCModel = Cisco A/B/G
and about 4 others that I can work out after I get these 3 working.
I was thinking of doing a module to evaluate this. Here is my first try at the code:
Function RadioCard(RCSN As String) As String
If RCSN = "832505" Then
RCModel = "Cisco A/B"
ElseIf RCSN = "838692" Then
RCModel = "Cisco A/B/G"
Else
GoTo Symbol
End If
Symbol:
If Len(RCSN) = "9" Then
RCModel = "Symbol S-24"
End If
End Function
It does compile, I use =RadioCard([RCSN]) in my unbound control source, but I still get no value when I run the report.
My question is, Am I going about this the right way, or is there better way?
If this is a good idea maybe someone could help with the code?
Thanks in advance
Kevin
First, I want to Thank Ken Hig for helping me on using CASE SELECT for something similar yesterday.
I have a report with a field RCSN, This can have several different values in it. Based on these values I want an unbound text field "RCModel" to display certain values:
1 - If Length of RCSN = 9 then RCModel = Symbol S-24
2 - If RCSN = 832505 then RCModel = Cisco A/B
3 - If RCSN = 838692 then RCModel = Cisco A/B/G
and about 4 others that I can work out after I get these 3 working.
I was thinking of doing a module to evaluate this. Here is my first try at the code:
Function RadioCard(RCSN As String) As String
If RCSN = "832505" Then
RCModel = "Cisco A/B"
ElseIf RCSN = "838692" Then
RCModel = "Cisco A/B/G"
Else
GoTo Symbol
End If
Symbol:
If Len(RCSN) = "9" Then
RCModel = "Symbol S-24"
End If
End Function
It does compile, I use =RadioCard([RCSN]) in my unbound control source, but I still get no value when I run the report.
My question is, Am I going about this the right way, or is there better way?
If this is a good idea maybe someone could help with the code?
Thanks in advance
Kevin