Dlookup错误----说不是可选的 [英] Dlookup errors ---- says not optional

查看:74
本文介绍了Dlookup错误----说不是可选的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我是新手,我试过,但是没有成功使Dlookup语句可选......帮助。这是我的代码:

Hello all experts,

I''m a newbie and I tried, but unsuccessfully to make the Dlookup statement optional...Help. Here''s my code:

展开 | 选择 | Wrap | 行号

推荐答案

Rosie,


您的DLookup语法不正确。此外,在您的情况下,它似乎应该如下所示,因为您的过程名为Customer_ID_NotInList:


将我用于说明目的的通用对象名称替换为应用程序中的实际名称。



如果CustomerID是文本

--------------------- ------
Rosie,

Your syntax for the DLookup is incorrect. Also, In your case, it seems it should look like the following because your procedure is named Customer_ID_NotInList:

Replace the generic object names I used for illustrative purposes with the actual names in your application.


if CustomerID is text
---------------------------
展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号



Rosie,

您的DLookup语法不正确。此外,在您的情况下,它似乎应该如下所示,因为您的过程名为Customer_ID_NotInList:


将我用于说明目的的通用对象名称替换为应用程序中的实际名称。



如果CustomerID是文本

--------------------- ------
Rosie,

Your syntax for the DLookup is incorrect. Also, In your case, it seems it should look like the following because your procedure is named Customer_ID_NotInList:

Replace the generic object names I used for illustrative purposes with the actual names in your application.


if CustomerID is text
---------------------------
展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号


你是对的。 DLookup正在查找表中的值,所以如果custname不在表中(绑定到),它就找不到它。制作不在列表中的唯一方法是与custname一起使用的是一个parse函数,它将custname分解为绑定的组件,并进行查找并通过绑定组件在后台添加。否则,你必须使用Dlookup的一个绑定控件。


如果你想使用解析函数,我可能会找到一个给你。请告诉我。
You are correct. the DLookup is looking up values in your table, so if custname is not in (bound to) the table, it won''t find it. The only way to make the "not in list" work with custname is to have a parse function that will break custname into its bound components and do the lookup and add in the background via the bound component. Otherwise, you have to use one of the bound controls for the Dlookup.

If you want to go with the parse function, I can probably find one for you. Let me know.


这篇关于Dlookup错误----说不是可选的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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