显示/隐藏对话框表单 [英] Show/Hide a Dialog Form

查看:93
本文介绍了显示/隐藏对话框表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个Modal,PopUp和Dialog的表单,但大部分时间都是隐藏的,这样我的其他表单的代码就可以使用这些字段。

模态意味着只有表格可以控制,直到它被关闭或隐藏,我希望。

PopUp意味着表格仍然在其他表格之上,我希望。

对话意味着代码会停止,直到表单关闭或隐藏,然后代码继续,我希望。


表单(fOptions)属性是Pop Up = Yes,Modal = Yes,和BorderStyle =对话。


我打开表格:

DoCmd.OpenForm" fOptions",acNormal ,,,,,,,,,,,


DoCmd.OpenForm" fOptions",acNormal ,,, acDialog,acHidden


当我做表格时!fOptions.Visible = True ,代码不等待表格再次隐藏(不是Dialog?)。


我怎样才能实现这个目标?


老鸟人


PS是否存在针对傻瓜的thescriptsforum?

I want a form that is Modal, PopUp, and Dialog, but that is hidden most of the time so that the fields are available to the code of my other forms.
Modal means that only the form can have control, until it is closed or hidden, I hope.
PopUp means that the form remains on top of other forms, I hope.
Dialog means that the code stops until the form is closed or hidden, then the code continues, I hope.

The form ("fOptions") properties are Pop Up=Yes, Modal=Yes, and BorderStyle=Dialog.

I open form with:
DoCmd.OpenForm "fOptions", acNormal, , , , , acHidden
or
DoCmd.OpenForm "fOptions", acNormal, , , , acDialog, acHidden

When I do Forms!fOptions.Visible = True, the code doesn''t wait for the form to be hidden again (not Dialog?).

How may I achieve this objective?

Old Birdman

P.S. Is there a thescriptsforum for dummies?

推荐答案


Old Birdman


PS是否有针对傻瓜的thescriptsforum?
Old Birdman

P.S. Is there a thescriptsforum for dummies?



就像名字一样,不要担心我们会把所有人都带到问题赌注中。只有一件事,你已经在文章部分而不是在论坛中发布了这个。我现在将这个问题移到Access论坛。


Mary

Like the name and don''t worry we take all comers in the question stakes. Just one thing, you have posted this in the Articles section rather than in the forum. I am now moving this question to the Access forum.

Mary



我想要一个形式是Modal,PopUp和Dialog,但大部分时间都是隐藏的,因此我的其他表单的代码可以使用这些字段。

模态意味着只有表单可以控制,直到关闭或隐藏,我希望。

PopUp意味着表单仍然在其他表单之上,我希望。

Dialog意味着代码停止直到表单关闭或隐藏,然后代码继续,我希望。


表格(fOptions)属性是Pop Up = Yes,Modal = Yes,BorderStyle = Dialog。


我用以下表格打开表格:

DoCmd.OpenForm" fOptions",acNormal ,,,,, acHidden



DoCmd.OpenForm" fOptions",acNormal ,,, acDialog,acHidden


当我做表格时!fOptions.Visible = True,代码没有''等等rm再次隐藏(不是Dialog?)。


我怎样才能实现这个目标?


老鸟人


PS是否有针对傻瓜的thescriptsforum?
I want a form that is Modal, PopUp, and Dialog, but that is hidden most of the time so that the fields are available to the code of my other forms.
Modal means that only the form can have control, until it is closed or hidden, I hope.
PopUp means that the form remains on top of other forms, I hope.
Dialog means that the code stops until the form is closed or hidden, then the code continues, I hope.

The form ("fOptions") properties are Pop Up=Yes, Modal=Yes, and BorderStyle=Dialog.

I open form with:
DoCmd.OpenForm "fOptions", acNormal, , , , , acHidden
or
DoCmd.OpenForm "fOptions", acNormal, , , , acDialog, acHidden

When I do Forms!fOptions.Visible = True, the code doesn''t wait for the form to be hidden again (not Dialog?).

How may I achieve this objective?

Old Birdman

P.S. Is there a thescriptsforum for dummies?



有趣的问题。你听起来不像是个假人。

不幸的是,如果我是对的,如果可见,你只能以模态方式工作。

我不确定是什么允许代码继续(关闭或隐藏),但如果它是隐藏,那么我不希望Show再次暂停代码。如果真相被告知,我也不希望Hide继续执行代码,但这只是我的猜测。


可以安排代码恢复(不是直截了当: ()通过使用OnTimer事件来检查表单的状态。这意味着重新设计代码的结构有点我很害怕。

Interesting question. You don''t sound like a dummy to me.
Unfortunately, if I''m right, you can only have a form work modally if it is visible.
I''m not sure exactly what allows code to continue (close or hide), but if it''s Hide, then I wouldn''t expect a Show to suspend the code again. If truth be told, I wouldn''t expect the Hide to resume the code execution either, but that''s only my guesswork.

Code resumption can be arranged (not straightforwardly :() by using the OnTimer event to check the status of the form. It means redesigning the structure of the code a little I''m afraid.


我是假的使用这个网站我错误地发布到文章部分,感谢玛丽移动帖子。

我试图搜索访问部分,但所有搜索似乎都是整个网站,并且必须阅读太多点击率,当我甚至不理解Access以外的大部分内容时。

我害怕在发布后关闭电脑,因为我不知道如何再次找到MY Thread。 br />

我的问题显然不明白。

1.如果我最初用DoCmd.OpenFormfOptions",acNormal ,,,打开我的选项表格, ,acHidden和表格属性如PopUp = True; Modal = True; BorderStyle = Dialog然后表单是开放的,可访问以下测试:如果Forms!fOptions.chkConfirmDelete然后... Msgbox .....结束如果

2.如果我的命令按钮更改选项使用代码Forms.fOptions.Visible = True,表单显示,并且是模态的。在关闭fOptions之前我不能使用主表单,但代码会一直持续到最后。如果我要更改未来事件的选择没问题,但如果我要更改当前显示的过滤器,则代码将使用原始过滤器运行,因为计算机比我输入的速度快。

3。选择命令按钮更改选项再次将达到预期的结果,因为代码在事先打开表单时运行完毕。


我不是在隐藏时尝试运行模态/对话框,只有在可见时。我可以将表单上的所有项目分配给全局变量,但这看起来很尴尬,如果发生任何错误,Access会不断丢失全局变量的所有值。这意味着每当我调试程序并发生错误时,我可能会丢失所有全局变量的值。这使得调试非常缓慢且点击次数很多。
I am Dummy as to using this site. I posted to "Articles Section" in error, Thanks Mary for moving post.
I have tried to search Access Section, but all searches seem to be of entire site, and must read through too many hits, when I don''t even understand most of the stuff outside Access.
I am afraid to turn off computer after post, as I don''t know how to find MY Thread again.

My question is apparently not understood.
1. If I originally open my Options Form with "DoCmd.OpenForm "fOptions", acNormal, , , , , acHidden" and with the form properties as PopUp=True; Modal=True; BorderStyle=Dialog then the form is open and accessable for such tests as: "If Forms!fOptions.chkConfirmDelete then ... Msgbox ..... End If"
2. If my command button "Change Options" uses the code "Forms.fOptions.Visible = True", the form shows, and is modal. I cannot use the primary form until I close fOptions, but the code continues to the end. No problem if I am changing choices for future events, but if I am changing the filter for the current display, the code runs with the original filter, because the computer is faster than my typing.
3. Selecting the command button "Change Options" again will achieve the desired result, as the code runs to completion with the prior open of the form.

I am not trying to run a modal/dialog form while hidden, only when visible. I could assign all items on the form to Global Variables, but this seems awkward, and Access continually loses all values for Global Variables if ANY ERROR occurs. This means that whenever I debug a program, and an error occurs, I may loose the values of ALL global variables. This makes debugging very slow and lots of clicks.


这篇关于显示/隐藏对话框表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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