Results 1 to 3 of 3

Thread: [resolved]data type mismatch error

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Location
    Earth, I think!!
    Posts
    249

    [resolved]data type mismatch error

    I got a "data type mismatch in criteria expression" error when i execute this statement
    Code:
    sql = "insert into jobs(shift,[date],user,prq,prtotal,prtwt)" & _
    " select prshift,format(prdate,'dd/MM/yyyy'),pruser,prtotal, "& _
    "prQueuename, prTWT  from preptbl where pruser = '" & Me.cboname.Text & "' and " & _
    "prdate=#" & Format(DTP.Value, "MM/dd/yyyy")& "# and prQueuename= '" & Me.txtQ.Text & "'"
    i can't figure what is wrong with this statement!!
    Last edited by alazarou; Nov 12th, 2003 at 02:30 PM.

  2. #2
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    alazarou

    What you need to do is to post the completed SQL statement (the one after all replacements). It would be easier than to try figure out what your replacements are.

    Use debug.print SQL to get the statement in the debugger and post that. You might be suprised if you figure it out yourself after seeing it. If not... We can look at it.
    Last edited by randem; Nov 12th, 2003 at 02:43 PM.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2003
    Location
    Earth, I think!!
    Posts
    249

    [resolved]data type mismatch error

    thanks again !!!
    it was date format problem

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