I have created the function below:
Public Function StripSpace(txtField As String) As String
Dim txtTemp As String
For x = 1 To Len(txtField)
If Mid(txtField, 1, x) <> " " Then
txtTemp = txtTemp + Mid(txtField, 1, x)
End If
Next x
txtField = txtTemp
End Function
I am calling it from a query by just having stripspace(fieldname) in the top bit. How ever when I run the query this column appears blank.
Not really created functions etc before so dont really know what is wrong.
Thanks
Public Function StripSpace(txtField As String) As String
Dim txtTemp As String
For x = 1 To Len(txtField)
If Mid(txtField, 1, x) <> " " Then
txtTemp = txtTemp + Mid(txtField, 1, x)
End If
Next x
txtField = txtTemp
End Function
I am calling it from a query by just having stripspace(fieldname) in the top bit. How ever when I run the query this column appears blank.
Not really created functions etc before so dont really know what is wrong.
Thanks