Dlookup给出了错误,说我错过了一个操作员 [英] Dlookup give san error saying I am missing an operator

查看:44
本文介绍了Dlookup给出了错误,说我错过了一个操作员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建登录表单并使用dlookup确认名字是否属于输入的员工ID。


Dlookup(FName,UserLogin,[ProcessorID] =''"& me.txtLoginID.value&"''")


我一直收到一条错误,说我错过了=。求助。

解决方案

ProcessorID是什么类型的字段?我怀疑它是数字的。

Me.TxtLogin的典型值是多少?它也是数字,如果不是你可能会尝试

展开 | 选择 | Wrap | 行号


ProcessorID是一个文本字段以及txtLogin 。

我确实尝试过该代码,但它没有用。


Dlookup(" [[Fname]",LoginForm",[ProcessorID] ] ="& CLng(Me.txtLoginID.Value))


我整个代码是

展开 | 选择 | Wrap | 行号

确定。你的上一个代码不起作用,因为DLookup只适用于表和查询,而不适用于表格


因此请再次尝试原始代码,但在&之前使用空格。但没有单词.Value

展开 | 选择 | Wrap | 行号


I am trying to make a login form and used dlookup to confirm that the first name belongs to the employee ID entered.

Dlookup("FName", "UserLogin","[ProcessorID]= ''"&me.txtLoginID.value &"''")

I keep getting an error saying I am missing =. Help please.

解决方案

What sort of field is ProcessorID? I suspect it is numeric.
What is a typical value of Me.TxtLogin? Is it also numeric, if not you might try

Expand|Select|Wrap|Line Numbers


ProcessorID is a text field as well as txtLogin.
I did try that code and it did not work.

Dlookup("[Fname]", "LoginForm", "[ProcessorID]=" & CLng(Me.txtLoginID.Value))

Me entire code is

Expand|Select|Wrap|Line Numbers


OK. Your last code will not work because a DLookup works only on tables and queries, not on a form

So try your original code again but with spaces round the "&" but without the word ".Value"

Expand|Select|Wrap|Line Numbers


这篇关于Dlookup给出了错误,说我错过了一个操作员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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