This is a VB Function written for Access 2 or 95? that removes dashes from wherever they show up. Do the identical code removing each hyphen, or whatever you want stripped.
Good Luck. Don Q
Function RemoveDashes(CompKey As String)
'
'Description: Removes all dashes from an incoming string.
'
'Author: Don Quigg, DataByte Software Development
'
'Date: 09/28/95
'
'Revisions: NA
'
Dim tStr As String 'Assembled string
Dim txt1 As String 'Remainder of CompKey as it is processed
Dim DashPos As Integer 'Position of next Dash
Dim rLen As Integer 'Remaining length of txt1
rLen = 0
txt1 = CompKey
tStr = ""
Do
If InStr(1, txt1, "-") > 0 Then 'check for no dashes
DashPos = InStr(1, txt1, "-")
tStr = tStr & Mid$(txt1, 1, DashPos - 1)
rLen = Len(txt1) - DashPos
txt1 = Right$(txt1, rLen)
Else
If rLen = 0 Then 'either no dashes or last segment
tStr = CompKey 'no dashes, move entire key
Else
tStr = tStr & txt1 'move last segment
End If 'rLen
rLen = 0
End If 'instr
Loop Until rLen <= 0
RemoveDashes = tStr
End Function