gcapp
10-27-2002, 05:05 PM
Is there a function that is similar to CheckString to see if the entry to my database table is a number??
I'm using a CheckString function that works for text datatypes and I wondered if there was one for number datatypes?
Or can this CheckString function be modified for numbers (i.e. CheckNumber??)
FUNCTION CheckString (s, endchar)
pos = InStr(s, "'")
While pos > 0
s = Mid(s, 1, pos) & "'" & Mid(s, pos + 1)
pos = InStr(pos + 2, s, "'")
Wend
CheckString="'" & s & "'" & endchar
END FUNCTION
I'm using a CheckString function that works for text datatypes and I wondered if there was one for number datatypes?
Or can this CheckString function be modified for numbers (i.e. CheckNumber??)
FUNCTION CheckString (s, endchar)
pos = InStr(s, "'")
While pos > 0
s = Mid(s, 1, pos) & "'" & Mid(s, pos + 1)
pos = InStr(pos + 2, s, "'")
Wend
CheckString="'" & s & "'" & endchar
END FUNCTION