Results 1 to 2 of 2

Thread: Data Type Mismatch in criteria expression.

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2017
    Posts
    8

    Data Type Mismatch in criteria expression.

    SELECT Count(tblTimeLog.LogDate) AS CountOfLogDate, tblTimeLog.EM_ID, tblTimeLog.NAME, tblTimeLog.TimeIn, tblTimeLog.TimeOut, tblTimeLog.E_ARRIVAL, tblTimeLog.L_DEPT, tblTimeLog.L_IN, tblTimeLog.E_DEPT, tblTimeLog.HOLIDAY_IN, Sum(tblTimeLog.OT) AS SumOfOT, Sum(tblTimeLog.LATE) AS SumOfLATE, tblTimeLog.REMARK
    FROM tblTimeLog
    GROUP BY tblTimeLog.EM_ID, tblTimeLog.NAME, tblTimeLog.TimeIn, tblTimeLog.TimeOut, tblTimeLog.E_ARRIVAL, tblTimeLog.L_DEPT, tblTimeLog.L_IN, tblTimeLog.E_DEPT, tblTimeLog.HOLIDAY_IN, tblTimeLog.REMARK;






    I had tried this Above query to get the sum value of tblTimeLog.OT & tblTimeLog.LATE which are in text field but i get this error. (Data Type Mismatch in criteria expression) please help to find the mistake and the solution. Thank You

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    6,738

    Re: Data Type Mismatch in criteria expression.

    You can't sum text fields.
    Either redesign your table or put conversion function in the query

Tags for this Thread

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