VBA查询帮助失败 [英] VBA failed query help

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

问题描述

我是一名微生物学家,但也涉及我们小实验室的许多计算机需求。我的最新项目涉及从供应商继承的未完成的数据库(Access 2000格式,我在XP PC上运行2003)。虽然我之前没有使用Access,但我已经在我们的数据管理员的帮助下(目前正在进行髋关节手术)并且我猜我现在是一名中级用户。我不知道VBA虽然有几个misc。编程课程(林肯小时候在大学里学习)帮助我完成了迄今为止我所需要的工作,但现在我(我认为)有一个我无法解决的VBA语法问题。

问题在于统计分析数据对的形式。为了便于理解,您可以查看表格,http://i55.photobucket.com/albums/g160/lagomorphmom/DeviceReportGenForm_jpg-1.jpg

大网格方块很有用(对我而言) )因为单击任何字段会产生一个查询,其中包含该字段中数据对的表数据 - 非常适合编辑数据。右下角的小表(''Sanity Checks'')(在生成表单时生成的临时表示)显示单个不匹配的数据,双击时,您也可以看到这些结果的表数据。整个表单似乎是在VBA中设计的,因为唯一的构建项目是左下方的三个可点击按钮。


问题在于Sanity Checks表 - 双击现在没有响应。它最初工作,并经过一些故障排除后,我认为问题是当我不得不将IsolateID列数据从数字更改为文本格式,因为站点之间的数量重叠(这使得顶部数据表无法正常工作)。双击不匹配数据的代码是:

展开 | 选择 | Wrap | 行号

解决方案


您好,我是微生物学家,但也涉及我们小实验室的许多计算机需求。我的最新项目涉及从供应商继承的未完成的数据库(Access 2000格式,我在XP PC上运行2003)。虽然我之前没有使用Access,但我已经在我们的数据管理员的帮助下(目前正在进行髋关节手术)并且我猜我现在是一名中级用户。我不知道VBA虽然有几个misc。编程课程(林肯小时候在大学里学习)帮助我完成了迄今为止我所需要的工作,但现在我(我认为)有一个我无法解决的VBA语法问题。

问题在于统计分析数据对的形式。为了便于理解,您可以查看表格,http://i55.photobucket.com/albums/g160/lagomorphmom/DeviceReportGenForm_jpg-1.jpg

大网格方块很有用(对我而言) )因为单击任何字段会产生一个查询,其中包含该字段中数据对的表数据 - 非常适合编辑数据。右下角的小表(''Sanity Checks'')(在生成表单时生成的临时表示)显示单个不匹配的数据,双击时,您也可以看到这些结果的表数据。整个表单似乎是在VBA中设计的,因为唯一的构建项目是左下方的三个可点击按钮。


问题在于Sanity Checks表 - 双击现在没有响应。它最初工作,并经过一些故障排除后,我认为问题是当我不得不将IsolateID列数据从数字更改为文本格式,因为站点之间的数量重叠(这使得顶部数据表无法正常工作)。双击不匹配数据的代码是:

展开 | 选择 | Wrap | 行号


谢谢,J,帮忙。我插入了新的qry = ...。这导致运行时错误94:错误使用空在下面的函数中,我突出显示调试器以粗体停止的行...再次,这里的帮助非常感谢!!!

展开 | 选择 | Wrap | 行号


以下之一可能是空值。我没有看到任何阻止这种情况的检查,如果你在空值上使用cstr(),你会得到这个错误,所以这里有一种方法。

展开 | 选择 | Wrap | 行号

Hi, I''m a microbiologist but also dabble with many of the computer needs of our little lab. My latest project involves an unfinished database (Access 2000 format, I''m running 2003 on XP PC) inherited from a vendor. Although I''ve not used Access before, I''ve been plugged along with the help of our data manager (currently out with hip surgery) and guess I''m an intermediate user now. I do not know VBA although several misc. programming classes (ack in college when Lincoln was a boy) have helped me do what I have needed to so far in that regard, but now I have (I think) a VBA syntax problem I cannot solve.

The problem is with a form which statistically analyzes data pairs. For easier understanding, you can view the form at, http://i55.photobucket.com/albums/g160/lagomorphmom/DeviceReportGenForm_jpg-1.jpg
The large grid square is pretty trick (for me) because clicking on any field produces a query containing the table data for the data pairs in that field - great for editing data. The small table (''Sanity Checks'') to the bottom right (in a tempqry made when generating the form) shows single, unmatched data and upon double click, you can see the table data for these results as well. The whole form seems to have been designed in VBA as the only ''build items'' are the three clickable buttons on the lower left.

The problem is with the Sanity Checks table - double-click is now unresponsive. It did work originally, and after some troubleshooting, I think the problem was when I had to change the IsolateID column data from number to text format because of number overlap between sites (this made the top data table not work correctly). The code for the unmatched data double-click is:

Expand|Select|Wrap|Line Numbers

解决方案

Hi, I''m a microbiologist but also dabble with many of the computer needs of our little lab. My latest project involves an unfinished database (Access 2000 format, I''m running 2003 on XP PC) inherited from a vendor. Although I''ve not used Access before, I''ve been plugged along with the help of our data manager (currently out with hip surgery) and guess I''m an intermediate user now. I do not know VBA although several misc. programming classes (ack in college when Lincoln was a boy) have helped me do what I have needed to so far in that regard, but now I have (I think) a VBA syntax problem I cannot solve.

The problem is with a form which statistically analyzes data pairs. For easier understanding, you can view the form at, http://i55.photobucket.com/albums/g160/lagomorphmom/DeviceReportGenForm_jpg-1.jpg
The large grid square is pretty trick (for me) because clicking on any field produces a query containing the table data for the data pairs in that field - great for editing data. The small table (''Sanity Checks'') to the bottom right (in a tempqry made when generating the form) shows single, unmatched data and upon double click, you can see the table data for these results as well. The whole form seems to have been designed in VBA as the only ''build items'' are the three clickable buttons on the lower left.

The problem is with the Sanity Checks table - double-click is now unresponsive. It did work originally, and after some troubleshooting, I think the problem was when I had to change the IsolateID column data from number to text format because of number overlap between sites (this made the top data table not work correctly). The code for the unmatched data double-click is:

Expand|Select|Wrap|Line Numbers


Thanks, J, for helping. I plugged in the new "qry=...". That lead to a "Run Time Error 94: Incorrect use of Null" in the following function, I highlighted the line the debugger stops at with bold... Again, help here is really appreciated!!!

Expand|Select|Wrap|Line Numbers


One of the following is probably a null value. I did not see any checks to prevent this and if you use cstr() on a null value you will get this error, so here is one method.

Expand|Select|Wrap|Line Numbers


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

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