为什么我在某些查询结果中遇到数据类型不匹配? [英] Why am I getting a data type mismatch in some of the query results?

查看:124
本文介绍了为什么我在某些查询结果中遇到数据类型不匹配?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的查询代码如下。由于某些原因,某些记录显示FileCount字段有错误。当我在该字段中单击时,它显示条件表达式中的数据类型不匹配。我假设它正在谈论DCount()函数中的标准。 DCount()函数的条件部分中引用的三个字段如下:

I have the following piece of code for my query. For some reason some of the records showup with the FileCount field having an error. When I click in the field it says "Data type mismatch in criteria expression." I assume that it is talking about the criteria in the DCount() function. The three fields that are referenced in the criteria portion of the DCount() function are as follows:

展开 | 选择 | Wrap | 行号

推荐答案

我是否理解正确,这是从VBA模块或表单中获取的代码?


IIF这是正确的,那么问题很可能在于你如何获得比较信息。因此,我将首先仔细检查比较数据是否为正确的数据类型。


让我在那里解释我的想法...


(因为我觉得我前面的代码比较清楚我会从你的帖子中删除一下):
Do I understand correctly, that this is code taken from a VBA module or form?

IIF this is correct, then the issue will more than likely be in how you are obtaining the comparison information. Thus, I would start with double checking that the comparison data is in the correct data-type.

Let me explain my thought there...

(because I think clearer with the code in-front of me I''ll just pull a snip from your post):
展开 | 选择 | 换行 | 行号


我的代码在查询中。得到我的部分是,在同一个查询执行中,一些记录有效,有些则不然。当我开始工作时,我会发送结果的打印屏幕。
My code is in a query. The part that gets me is that in the same query execution, some of the records work and some don''t. When I get to work, I''ll send a print screen of the results.


Seth,286个帖子,我没有把你链接到发布前(VBA或SQL)代码了吗?我对此表示怀疑;-)请在发布问题时遵循指南,否则你只会让整个情况变得更加复杂。
Seth, 286 posts and I haven''t linked you to Before Posting (VBA or SQL) Code yet? I doubt it somehow ;-) Please follow the guidelines there when posting your questions, as otherwise you just make the whole situation so much more complicated to deal with.


这篇关于为什么我在某些查询结果中遇到数据类型不匹配?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆