控制飞行? [英] Controls Flying?

查看:73
本文介绍了控制飞行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,


我正面临着一个奇怪的问题,并且不知道故障在哪里。


我在Access 2003中有一个带Tab控件的表单。在每个选项卡中,我有一个文本框和两个Datepicker控件。奇怪的部分是有时(并非所有时间),只要我按下文本框中的Tab键,Datepicker就会控制飞。到表单的最左上角。我已经检查了我编写的每一段代码,但是我没有更改控件的位置。


以下是为文本框编写的代码:

Guys,

I''m facing a wierd problem and don''t exactly know where the glitch is.

I have a form with Tab control in Access 2003. In each tab, I have a text box and two Datepicker controls. The wierd part is that sometimes (not all the times), as soon as I press the Tab key in the textbox, the Datepicker controls "Fly" to the topmost left corner of the form. I have checked every bit n piece of the code that I have written, but nowhere am I changing the position of the controls.

The following is the code written for the Text Box:

展开 | 选择 | Wrap | 行号

推荐答案

嗨Yaaara。没有明显的东西从你的代码中跳出来。


你需要检查相关控件的LEFT和TOP属性。您可以在代码中添加msgbox语句之前和之后,以查看是否会对此有所了解,例如:

Hi Yaaara. Nothing obvious jumps out from your code.

You''ll need to check the LEFT and TOP attributes of the controls concerned. You can add before and after msgbox statements in your code to see if this sheds any light on it, like this:

展开 | 选择 | 换行 | 行号


感谢Stewart的快速响应,但这并不是一直发生的。如果每次都发生这种情况,我会认为与左派有关。顶级属性..它只是在随机时间发生这种情况,而在其他时候,控件保持在它们应该的位置......

Thanks for the prompt response Stewart, but this doesn''t happen all the time. Had this been happening every time, I would have assumed that there is something to do with the Left & the Top attributes.. Its just at random times that this happens while at other times, the controls stay where they are supposed to be...


嗨Yaaara。没有明显的东西从你的代码中跳出来。


你需要检查相关控件的LEFT和TOP属性。您可以在代码中添加msgbox语句之前和之后,以查看是否会对此有所了解,例如:

Hi Yaaara. Nothing obvious jumps out from your code.

You''ll need to check the LEFT and TOP attributes of the controls concerned. You can add before and after msgbox statements in your code to see if this sheds any light on it, like this:

展开 | 选择 | 换行 | 行号


我还将你建议的代码放在文本框的GotFocus,AfterUpdate和Exit事件中..


令我惊讶的是,弹出的消息框带有属性在GotFocus活动中,但没有任何其他活动..不知道为什么会发生这种情况..


任何线索?

I also put the code you advised in the GotFocus, AfterUpdate and Exit events of the text box..

To my surprise, the message box pops up with the attributes in the GotFocus event, but not for any other events.. Not sure why this is happening..

Any clues?


感谢您的快速回复斯图尔特,但这并不是一直发生的。如果每次都发生这种情况,我会认为与左派有关。顶级属性..它只是在随机时间发生这种情况,而在其他时候,控件保持在它们应该的位置...
Thanks for the prompt response Stewart, but this doesn''t happen all the time. Had this been happening every time, I would have assumed that there is something to do with the Left & the Top attributes.. Its just at random times that this happens while at other times, the controls stay where they are supposed to be...


这篇关于控制飞行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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