I have a case in which I am trying to pull the state value from a description field. However, I need to change some columns depending on the state. So here is what I have
Description Example: Management EXECUTIVE CTJACKSONVILLE.FL.32216-4041
Function getState(description As String) As String
Dim s() As String
s = Split(description, ".")
getState = s(UBound(s) - 1)
End Function
I want to change some columns depending on if it returns a correct State abbreviation or not. If the value does not return a valid state I want to flag the invoice. So something like this...
UPDATE tblInvoices
SET [Invoice Flag] = True
Where getState(description) <> ValidStates.Abbreviation
Something along those lines. Sorry for the newbie-ness. Any help is appreciated!