Results 1 to 2 of 2

Thread: Type mismatch error

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Location
    ottawa, canada
    Posts
    233

    Type mismatch error

    The following is SQL query has given me a type mismatch error.


    strSQL = "Select * From CALIBRESULTS where InstrumenNumber = " & "'" & Form3.Label4.Caption & "'" And idnumber = "'" & Form3.Text51.Text & "'"

    I think the problem is that instrumennumber field is a string while the idnumber field is an integer.

    Any thoughts?

    Also, can you please tell me if the "" and ' marks are in the correct place. I always mess up on that one.

    Thanks

  2. #2
    Addicted Member rdove's Avatar
    Join Date
    Dec 2002
    Location
    Indianapolis
    Posts
    251
    If what your say is the case, then it should look like:

    VB Code:
    1. strSQL = "Select * From CALIBRESULTS where InstrumenNumber = '" & Form3.Label4.Caption & "' And idnumber = " & Form3.Text51.Text
    ~Ryan





    Have I helped you? Please Rate my posts.

Posting Permissions

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



Click Here to Expand Forum to Full Width