I have a field called [Client_number] and the value of that field can be deciphered into a location for that client.
Eg. SU[any letter]023[000-999] = UK
SA[anyletter]024[000-999] = Australia
....so SUR023023 = UK, whereas SUT024076 = Australia.
This is simplified as there are 30 possible locations.
I would like a field called [location] that returns the correct location. I tried the following in the AfterUpdate box for the [Client_number] field.
If [Client_number] Like "[SU]?[023]*" Then
[Location] = "UK"
ElseIf [Client_number] Like "[SA]?[024]*" Then
[Location] = "Australia"
End If
...but it doesn't work. It returns "UK" for either "Likes".
Any suggestions?
Thanks
David
Eg. SU[any letter]023[000-999] = UK
SA[anyletter]024[000-999] = Australia
....so SUR023023 = UK, whereas SUT024076 = Australia.
This is simplified as there are 30 possible locations.
I would like a field called [location] that returns the correct location. I tried the following in the AfterUpdate box for the [Client_number] field.
If [Client_number] Like "[SU]?[023]*" Then
[Location] = "UK"
ElseIf [Client_number] Like "[SA]?[024]*" Then
[Location] = "Australia"
End If
...but it doesn't work. It returns "UK" for either "Likes".
Any suggestions?
Thanks
David
Comment