Dlookup适用于所有形式,除了一个。 [英] Dlookup works on all forms, except one.

查看:96
本文介绍了Dlookup适用于所有形式,除了一个。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下Dlookup:

展开 | 选择 | Wrap | 行号

解决方案

您的表单是否有一个名为AvatarNumber的字段以及ControlSource是AvatarNumber吗?


AvatarNumber能否为Null(例如新记录)?


Phil

以下是解决问题的几种方法。首先,尝试删除DLookup()函数的条件,并查看是否返回了一个值(如果它是正确的值则无关紧要)。在该行代码之前,插入以下内容:

展开 | 选择 | Wrap | 行号


使用DLookup前面的=符号,看起来你正在尝试将它应用于控件源属性vs VBA代码。


如果确实在控件源属性中使用了这一属性,则在属性表上使用Me。前缀将落空(据我所知,只在VBA中有效)。


您可以使用完整的表单参考:

展开 | 选择 | Wrap | 行号


I have the following Dlookup:

Expand|Select|Wrap|Line Numbers

解决方案

Does your form have a Field called AvatarNumber as well as the ControlSource being AvatarNumber?

Can AvatarNumber ever be Null (On a new record for example)?

Phil


Here are a few ways to troubleshoot your problem. First, try removing the criteria of the DLookup() function and see if a value is returned (it doesn''t matter if it is the correct value). Right before that line of code, insert the following:

Expand|Select|Wrap|Line Numbers


With the = sign in front of your DLookup, it looks like you are trying to apply this to a control source property vs VBA code.

If this is indeed used in a control source property, on a property sheet, the "Me" prefix will fall over (to my knowledge that is only valid in VBA).

You can use the full form reference:

Expand|Select|Wrap|Line Numbers


这篇关于Dlookup适用于所有形式,除了一个。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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