迷失焦点焦点我无法集中注意力

迷失焦点焦点我无法集中注意力

本文介绍了迷失焦点焦点我无法集中注意力的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在尝试验证表单中的QTY条目,如果用户没有输入任何内容或0,我将提示输入一条消息并且光标返回到QTY条目列。 我在数量上尝试了迷失焦点 - 如果数量< = 0则 msgbox(请输入数量) me.qty.SetFocus 结束如果 但光标总是跳到下一个输入框,我甚至用Cancel = true替换,它仍然无法工作,任何想法?解决方案 更改为After Update事件。 展开 | 选择 | Wrap | 行号 一旦输入控件,它应该触发更新后事件。但是,当然,您只需要在表单OnClose事件中调用该事件。 展开 | 选择 | Wrap | 行号 I am trying to validate a QTY entry in a form , if user did not enter anything or 0 , I will prompt for a message and the cursor return to the QTY entry column. I have tried Lost Focus in the Qty -If qty <=0 then msgbox("Please Enter Qty") me.qty.SetFocusend ifBut the cursor alway jump to the next entry box, I even replace with Cancel=true, it still doesnt work, Any Idea ? 解决方案Change to After Update event. Expand|Select|Wrap|Line NumbersOnce the control has been entered it should trigger the after update event. However, to be sure, you just have to call the event in the forms OnClose event. Expand|Select|Wrap|Line Numbers 这篇关于迷失焦点焦点我无法集中注意力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-28 22:04