J
JohnD
I am running the following query with the MungPart function. I have shown
the query then the function. I do not understand why it keeps coming back
with an error, so any help from fresh eyse would be appreciated. All this is
supposed to so is take out the garbage from the Sheet1.grainger1 field and
place the clean data in sheet1.grainger2 field.
SELECT Sheet1.proto, Sheet1.grainger1, Sheet1.flag, Sheet1.grainger2
FROM Sheet1
WHERE (((Sheet1.grainger2)=MungPart([grainger1])));
Function Mungpart(strPart As String) As String
Dim i As Integer
Dim StrChar As String
Dim StrTemp As String
For i = 1 To Len(strPart)
StrChar = Mid$(strPart, i, 1)
Select Case StrChar
Case " "
Case "_"
Case "-"
Case "."
Case Else
StrTemp = StrTemp & StrChar
End Select
Next i
Mungpart = StrTemp
End Function
the query then the function. I do not understand why it keeps coming back
with an error, so any help from fresh eyse would be appreciated. All this is
supposed to so is take out the garbage from the Sheet1.grainger1 field and
place the clean data in sheet1.grainger2 field.
SELECT Sheet1.proto, Sheet1.grainger1, Sheet1.flag, Sheet1.grainger2
FROM Sheet1
WHERE (((Sheet1.grainger2)=MungPart([grainger1])));
Function Mungpart(strPart As String) As String
Dim i As Integer
Dim StrChar As String
Dim StrTemp As String
For i = 1 To Len(strPart)
StrChar = Mid$(strPart, i, 1)
Select Case StrChar
Case " "
Case "_"
Case "-"
Case "."
Case Else
StrTemp = StrTemp & StrChar
End Select
Next i
Mungpart = StrTemp
End Function