Dlookup没有返回正确的值 [英] Dlookup not returning correct value

查看:125
本文介绍了Dlookup没有返回正确的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的dlookup在返回值为935时返回0.我仔细检查变量和表的拼写。我似乎无法弄清楚我在哪里出错了。

My dlookup is returning a 0 when it should return a value of 935. I have double check the spelling of the variable and tables. I can''t seem to figure out where I''m going wrong on this on.

展开 | 选择 | Wrap | 行号

推荐答案

我确实有一个想法。可能是因为我的表日期还附有日期的时间戳,我将如何将格式日期添加到短日期中。进入dlookup
I did have one after thought. Could it be because my tables date also has the time stamp attached to the date and how would I add in a format dates to "short date" into the dlookup


首先,让我们首先将您的条件拆分为自己的字符串,以便我们可以调试您的代码。
First, lets start by splitting out your criteria into its own string so that we can debug your code.
展开 | 选择 | Wrap | 行号


这是在即时窗口中的内容。


" Employee ='' Batson,Leroy''和[Date] =#4/7/2014#和[Trip Sign Off] = 0"
Here is what was in the immediate window.

"Employee=''Batson, Leroy'' And [Date]=#4/7/2014# And [Trip Sign Off]=0"


这篇关于Dlookup没有返回正确的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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