Thanks to all who assisted with my previous request. Here is another one

Need to input weight and volume as 12kgs and Volume as 12ltr in database.
Need also later to do calculations with the numbers therefore need to strip out alpha characters. (do not want to input twice)

Any one with a better or shorter version as the one below that I use currently to strip invalid characters from customer name as it will take up a lot of programming lines to strip out all alpha characters from a string

'Strip out invalid characters in the Customer name...
If InStr(txtname.text, "#") > 0 Then
Mid$(txtname.text, InStr(txtname.text, "#"), 1) = Chr$(32)
ElseIf InStr(txtname.text, "$") > 0 Then
Mid$(txtname.text, InStr(txtname.text, "$"), 1) = Chr$(32)
ElseIf InStr(txtname.text, "%") > 0 Then
Mid$(txtname.text, InStr(txtname.text, "%"), 1) = Chr$(32)
End If

End If

Raycomp