How do you trouble shoot a “Data type mismatch in criteria expression” error in MS Access 2010? [closed]

北战南征 提交于 2020-01-11 08:59:29

问题


I am trying to troubleshoot a Report in an MS Access Database. This file was build by the person that held my role before I joined the organization I work for.

The report is throwing an error "Data type mismatch in criteria expression" This leads me to believe that the data being imported into the DB is not compatible with the data types set in the report's query. There are 53 pieces in the SQL SELECT Statement.

Is there a good way to trouble shoot the statement (in Access) to find which piece is causing the error? I'm just getting back into using Access so I'm a little rusty.


回答1:


The criteria expression is the part of the query containing the conditions, as in WHERE <condition>. Look at those specifically. The error message means you're comparing two things (this equals that, or this less than that, etc.) that are of two different, and incompatible types (comparing a number to a string, for example).

You can find out which condition is causing the problem by deleting them one at a time and testing again each time until the error disappears.

Make sure you save a copy of your original query, or make a new copy for testing.



来源:https://stackoverflow.com/questions/28155538/how-do-you-trouble-shoot-a-data-type-mismatch-in-criteria-expression-error-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!