Here's a function that starts at the end of a String and counts backwards until it finds an asterisk (character 42). Then it cuts off everything from that point to the end of the string.
Code:
Dim intCurrChar, intTrimAt as Integer
intTrimAt = -1
intCurrChar = Len([ID CODE]) - 1
Do While intCurrChar > 0
If Left([ID CODE], intCurrChar, 1) = Chr(42) Then
intTrimAt = intCurrChar
intCurrChar = 0
End If
intCurrChar = intCurrChar - 1
Loop
If intTrimAt > -1 Then
[ID CODE] = LEFT([ID CODE], 0, intTrimAt)
End If
You'll need to figure out the parts in Bold, but everything else should work.