下标超出范围问题 [英] subscript out of range problem

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

问题描述

这是aceess

SELECT indents.pr_no, indents.issue_date, items.description, items.units, items.item_group, indentitems.quantity, indentitems.date_required, departments.system_name, departments.subsystem_name
FROM ((indentitems INNER JOIN indents ON indentitems.pr_no=indents.pr_no) INNER JOIN departments ON indentitems.department_code=departments.department_code) INNER JOIN items ON indentitems.item_code=items.item_code;


当我使用表单向导为该查询创建表单时,错误框显示下标超出范围.
我不知道发生了什么
有人可以帮忙吗??
在此先感谢


when i use the form wizard to make a form for this query the error box shows subscript out of range..
i dont understand what is happening
can anyone help please????
thanks in advance

推荐答案

当您尝试移动到具有有关集合上限的索引的记录时,发生下标超出范围错误.

例如如果您有一个由10个元素定义的数组,并且您尝试读取元素11.

没有看到引发异常的代码,很难说出确切的问题.

建议您逐步执行代码,直到找到引发异常的行,然后计算出对任何索引值的处理方式.

一个常见的错误是忘记了计数将大于索引值,并且在迭代引用该计数的集合时,需要从上限减去1.
A subscript out of range error occurs when you are trying to move to a record which has an index about the upperbound of the collection.

e.g. if you have an array defined with 10 elements and you try to read element 11.

Without seeing code which is throwing the exception it is difficult to say the exact problem.

Suggest you step through your code until you find the line that throws the exception and then work out what you are doing with any index values.

A common error is forgetting that counts will be higher than index values and when iterating sets referencing the count, you need to subtract 1 from the upper limit.


这篇关于下标超出范围问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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