查询“查询”构建器中的返回值,但在VBA中为null [英] Query returning value in Access query builder but null in VBA

查看:77
本文介绍了查询“查询”构建器中的返回值,但在VBA中为null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我在访问查询构建器中运行以下查询。查询的名称是qryTempRecEFTBankedMaxDate:

Hi I am running the following query in access query builder. The name of the query is "qryTempRecEFTBankedMaxDate":

展开 | 选择 | Wrap | 行号

推荐答案

可以'那里看错了:(


查看rst.Open(第2行)以获取正确的参数,并确保第一个被定义为DAO.Recordset如果你需要那个或ADODB.Recordset否则。


可能只是.Open行没有按预期工作。在调试器中检查出来(在VBA中调试
Can''t see much wrong there :(

Check out the rst.Open (line #2) for correct parameters, and make sure that rst is defined as DAO.Recordset if you need that or ADODB.Recordset otherwise.

It could simply be the .Open line not working as expected. Check it out in the debugger (Debugging in VBA).


@iheartvba
尝试:
展开 | 选择 | Wrap | 行号


我已尝试过上述所有建议。以下是我的代码的一些snipets(如果以下代码在我看来运行代码应该仍然有效)

I have tried all of the above suggetions. Here are some snipets of my code (if the following code is run in my opinion the code should still work)

展开 | 选择 | 换行 | 行号


这篇关于查询“查询”构建器中的返回值,但在VBA中为null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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