Hi All,
i borrowed and slightly modified one of PHV's functions and now I can't get it to run in an update query.
Here's the code for the function:
here is my query sql:
I'm getting "undefined function 'getPhoneNum' in query" error. I've checked the references in vb and i have none missing.
Any help would be appreciated.
thanks!
i borrowed and slightly modified one of PHV's functions and now I can't get it to run in an update query.
Here's the code for the function:
Code:
Public Function getPhoneNum(strPhone)
Dim i As Integer, x As String, s As String
If Len(Trim(Nz(strPhone, ""))) = 0 Then Exit Function
For i = 1 To Len(strPhone)
x = Mid(strPhone, i, 1)
If IsNumeric(x) Then s = s & x
Next i
getPhoneNum = Format(s, "##########")
End Function
here is my query sql:
Code:
UPDATE Contacts SET Contacts.WorkPhone = getPhoneNum([WorkPhone]);
Any help would be appreciated.
thanks!