本文介绍了DLOOKUP在测试数据库中工作,但不在实际数据库中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行了一个测试数据库,该数据库从Products表中查找产品信息,以通过表单填充Sales表中的字段。在测试数据库中,我输入产品编号,并显示项目描述和价格(我使用DLOOKUP执行此操作)。当我手动将代码复制到真实数据库时,输入的产品ID并不重要,只有Products表中的第一项填充了Item描述和Price字段。在这两个数据库中,我在After Update事件下使用了VBA。我打开了两个VBA文件,它们看起来完全一样。为什么一个工作而另一个工作呢?除了DLOOKUP之外还有更好的方法来做同样的事情吗?

I ran a test database that looks up product information from the Products table to populate fields in the Sales table through a form. In the test DB, I enter the product number, and the item description and price appear(I used DLOOKUP to do this). When I manually copy the code over to the real DB, it doesn''t matter what product ID I type in, only the first item in the Products table populates the Item description and Price fields. On both databases, I used VBA under the After Update event. I have opened both VBA files and they look exactly the same. Why does one work and the other doesn''t? Is there a better way to do the same thing besides DLOOKUP?

推荐答案




这篇关于DLOOKUP在测试数据库中工作,但不在实际数据库中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 02:22
查看更多