做一个不做rst.eof循环而不传递else语句的原因? [英] Doing a do while not rst.eof loop not passing on else statement why?

查看:150
本文介绍了做一个不做rst.eof循环而不传递else语句的原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计....我已经重组了我的代码,因为它在做了一个循环后说它 .eof = true 如果直接进入 endif ...没有通过通过其他,知道为什么吗?

展开 | 选择 | Wrap | 行号

解决方案




我最初的想法是rst.EOF实际上是假的,但返回的记录都没有与txtDocLogNo值匹配。那么这似乎绝对没有了!


??


MTB


< blockquote>嗨迈克,是的,最初它是假的...我在txtDocLogNo<>中的输入rst!docLogNo所以当.eof = true时它必须告诉用户没有找到记录。


我对你的问题有点困惑。你能用上面的行号解释你希望代码采用的路径吗?听起来你期望它从第7行开始做Do While循环,然后根据你的标题和问题在第32行采取Else路径。


此外,还有多个记录rst!docLogNo = Me.txtDocLogNo.Value?如果没有,有更好的方法来做到这一点。


guys .... am already restructuring my codes as am doing a loop after it says that .eof = true if goes directly to endif ... not passing thru else, any idea why?

Expand|Select|Wrap|Line Numbers

解决方案

Hi

My initial thought here is that rst.EOF is actually False, but none ot the returned records match the txtDocLogNo value. This would then appear to do absolutly nothing !!

??


MTB


hi Mike, yes initially it''s false ... my input in txtDocLogNo <> with rst!docLogNo so when .eof = true it must tell the user that record is not found.


I''m a little confused about your question. Can you explain the path you expect the code to take using line numbers from above? It sounds like you are expecting it to do the Do While loop starting on line 7 and then take the Else path on line 32 based on your title and question.

Also, are there multiple records where rst!docLogNo = Me.txtDocLogNo.Value? If not, there is a much better way to do this.


这篇关于做一个不做rst.eof循环而不传递else语句的原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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