嵌套循环不起作用 [英] Nested Loop Not working

查看:77
本文介绍了嵌套循环不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我正在尝试创建一个嵌套循环(在Access 2003 / VB中),该循环将在表单上打印一组用户定义月份的报告,并打印出来每个客户。因此,第一个循环会将客户端增加1,然后第二个循环会将Month增加1.因此第一次围绕第1个月的客户端A,然后是第2个月的客户端A,然后是第1个月的客户端B,依此类推。下面是我已经拥有的,我可以让嵌套循环工作并增加月份,但是我有一点时间增加外部循环(客户端)。以下是我的代码。在此先感谢您的帮助。

Hello,
I am attempting to create a nested loop (in Access 2003/VB) that will print a report for a set of user defined months inputed on a form and that will print out for every Client. So the first loop would increment the Client by 1, then the second loop would increment the Month by 1. So the first time around Client A for Month 1, then Client A for month 2 then Client B for Month 1 and so on. Below is what I have already, I can get the nested loop to work and increment the months, but am having a heck of a time incrementing the outer loop (Client). Below is my code so far. Thanks in advance for your help.

展开 | 选择 | Wrap | 行号

推荐答案

我不会去回答,因为这不是我的区域。但是因为还没有其他人把他们的桨放进去......


跳出来的一件事就是这行...
I wasn''t going to reply since this isn''t really my area. But since nobody else has put their oar in yet...

One thing which jumped out at me is that this line...
展开 | 选择 | Wrap | 行号


感谢您的回复。我完全明白你在说什么......我之所以这样设置的原因是因为我无法弄清楚如何初始化增量...我不得不以某种方式将客户端(i)分配给客户...我假设必须有更好的方法,但我不知道那是什么。

Thank you for your response. I completely understand what you are saying...the reason I set it up that way was because I could not figure out how to initialize the increment...I had to assign (i) to Client somehow to increment the data...I''m assuming there has to be a better way but I don''t know what that is.


我不打算回答,因为这不是我的区域。但是因为还没有其他人把他们的桨放进去......


跳出来的一件事就是这行...
I wasn''t going to reply since this isn''t really my area. But since nobody else has put their oar in yet...

One thing which jumped out at me is that this line...
展开 | 选择 | Wrap | 行号



感谢您的回复。我完全明白你在说什么......我之所以这样设置的原因是因为我无法弄清楚如何初始化增量...我不得不以某种方式将客户端(i)分配给客户...我假设必须有一个更好的方法,但我不知道那是什么。
Thank you for your response. I completely understand what you are saying...the reason I set it up that way was because I could not figure out how to initialize the increment...I had to assign (i) to Client somehow to increment the data...I''m assuming there has to be a better way but I don''t know what that is.



抱歉,我不能提供更多帮助,但您是否尝试过测试Client_All.ItemData(i)而不是Client_Box.ItemData(i)的建议循环直到?换句话说......

Sorry I can''t be of more help, but did you try the suggestion of testing Client_All.ItemData(i) instead of Client_Box.ItemData(i) in the Loop Until? In other words...

展开 | 选择 | Wrap | 行号


这篇关于嵌套循环不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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