Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
function Digits(sVal as string)
for i = 1 to len(sVal)
b = mid(sVal, i, 1)
select case b
case "0" to "9"
Digits = Digits & b
end select
next
end function
Public Function getNum(myField)
Dim s As String, l As Long, x As String
If Len(Trim(Nz(myField, ""))) = 0 Then
getNum = myField
Exit Function
End If
For l = 1 To Len(myField)
x = Mid(myField, l, 1)
If (x >= "0" And x <= "9") Then
s = s & x
End If
Next l
getNum = s
End Function
function JustNumbers(rng)
if isnumeric(rng.value) then
JustNumbers = rng.value
end if
end function
PHv said:Then in the query grid:
NumOnly: getNum([serial number field])
Public Function getNum(myField)
If Len(Trim(Nz(myField, ""))) > 0 _
And IsNumeric(Trim(myField)) Then
getNum = myField
Else
getNum = ""
End If
End Function