帮助DLookup [英] Help with DLookup

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

问题描述

你好,

我有一个DB链接表到ODBC,以及基于它们的查询。我有一个包含3个级联组合框和包含子表单的选项卡的表单。与主窗体上的组合框一起,我有一个txtJobNum和一个txtVendorNum。我拥有的子表单是Job和Vendor。在子表单Job中,我有txtJobNum,在子表单Vendor中我有txtVendorNum。我所做的是使用最后一个组合框中的列来填充主窗体上的txtJobNum和txtVendorNum。为了让txtJobNum和txtVendorNum在相应的子表单中复制,我使用了DLookup。如何将其余字段填入我的子表单中?此外,我收到任何返回null的记录错误,如何让DB忽略这个?

Hello,
I have a DB with linked tables to ODBC, and queries based on them. I have a form with 3 cascading combo boxes and tabs containing subforms. Along with the combo boxes on the main form I have a txtJobNum, and a txtVendorNum. The subforms I have, are Job and Vendor. In subform Job, I have txtJobNum, and in subform Vendor I have txtVendorNum. What I did was use columns from the last combo box to populate txtJobNum and txtVendorNum on the main form. To get txtJobNum and txtVendorNum to replicate in the corresponding subforms, I used DLookup. How do I get the rest of the fields to populate in my subforms? Also, I get an error with any records that come back null, how can I get the DB to ignore this?

< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号

推荐答案

听起来您希望子表单绑定到记录集,并使用子表单的Link Master和Link Child字段根据主表单上文本框中的值过滤记录。例如,

链接主字段:txtJobNum(在主窗体上)

链接子字段:JobNum(查询中包含的字段)

当您使用它时,DLookup似乎正好查找您作为参数赋予它的值,什么都不做。
It sounds like you want your subforms bound to a recordset, and use the Link Master and Link Child fields of the subform to filter the records based on the value in the text box on the main form. For example,
Link Master Field: txtJobNum (on the main form)
Link Child Field: JobNum (a field included in the query)

The DLookup, as you are using it, appears to look up exactly the value you give it as an argument, accomplishing nothing.


从txtJobNum说过滤器是正确的。 。我的子表单已绑定到tblPart,并从qryPart获取记录。表单和子表单设置为数据输入。我正在尝试从查询中提取记录,然后保存到表中。
You are correct in saying filter from txtJobNum. My subform is already bound to tblPart, and gets the record from qryPart. The form and subforms are set to data entry. I''m trying to pull down records from the queries, and save to a table.


ChipR:


在子表单中,我可以根据txtJobNum中的信息执行类似脏的txtJobNum查询?
ChipR:

In the subform, could I do something like txtJobNum on dirty to query based on information in txtJobNum?


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

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