data type mismatch error

Results 1 to 2 of 2

Thread: data type mismatch error

  1. #1
    Join Date
    Dec 1969

    Default data type mismatch error

    Can someone check this out?<BR><BR>I keep getting a data type mismatch error. I&#039;m trying to insert a record into my table and three of the fields are number datatype.<BR><BR>The code I keep getting an error is in here:<BR><BR>SQL = SQL & "Zip = " & CheckString(txtZip,",")<BR><BR>At the top of my code I have a function for checkstring like such:<BR><BR>FUNCTION CheckString (s, endchar)<BR> pos = InStr(s, "&#039;")<BR> While pos &#062; 0<BR> s = Mid(s, 1, pos) & "&#039;" & Mid(s, pos + 1)<BR> pos = InStr(pos + 2, s, "&#039;")<BR> Wend<BR> CheckString="&#039;" & s & "&#039;" & endchar<BR>END FUNCTION<BR><BR><BR>Should I have a similar code for numbers??<BR><BR>I&#039;m new, so if someone can help, I&#039;d appreciate it.<BR><BR>Gary

  2. #2
    Join Date
    Dec 1969

    Default Crosspost

    and I already answered you on the other forum.

Posting Permissions

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