number only form

Results 1 to 2 of 2

Thread: number only form

  1. #1
    Join Date
    Dec 1969

    Default number only form

    is there a way to make sure that the Request call for a certain field in the form returns a number and not a string. the problem i am having is that i do a generic request on all of my forms then use this function called fix() which looks like this:<BR><BR>Function fix(varIn)<BR> back=varIn<BR> if(VarType(varIn)=8) then<BR> back = "&#039;" & varIn & "&#039;" <BR> end if<BR> fix=back<BR>end function<BR><BR>VarType 8 is string the problem is that it is storing all of my numbers in string variables and not ints or longs or whatever so it adds the single quotes around the value and gives me a bad insert call because the table requires numbes. i want a way to change this stuff on the page side in the form itself bacuse putting special cases into what is supose to be generic read sets would seem to defeat the point<BR><BR>thanks<BR>andrew

  2. #2
    Join Date
    Dec 1969

    Default RE: number only form

    All requests come back as string. Instead of vartype, do something like<BR><BR>If isNumeric(varIn) Then<BR> &#039;It&#039;s a number, no quotes<BR>Else<BR> &#039;It&#039;s not a number, quotes<BR>End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts