G
Guest
Instead of using the built in IIF function, I wanted to try my hand at
building a custom function using SELECT CASE instead.
I want my function to look at the [Legal Entity Cd] field, and perform an
action based on the legal entity code contained within this field. The
Select Case would look something like this:
Function Entity()
Select Case [Legal Entity Cd]
Case "10"
Debug.Print "NSP-MN"
Case "11"
Debug.Print "NSP-WI"
Case Else
Debug.Print "Other"
End Select
When I try to incorporate this function into my select query, I get a
"External Name not Defined" error. Any ideas?
building a custom function using SELECT CASE instead.
I want my function to look at the [Legal Entity Cd] field, and perform an
action based on the legal entity code contained within this field. The
Select Case would look something like this:
Function Entity()
Select Case [Legal Entity Cd]
Case "10"
Debug.Print "NSP-MN"
Case "11"
Debug.Print "NSP-WI"
Case Else
Debug.Print "Other"
End Select
When I try to incorporate this function into my select query, I get a
"External Name not Defined" error. Any ideas?