gpt4 book ai didi

forms - 在 MS Access VBA 中等待表单关闭的最佳方式是什么?

转载 作者:行者123 更新时间:2023-12-04 19:18:33 25 4
gpt4 key购买 nike

我从一个模块调用一个表单,并希望在完成该模块的其余部分之前等待表单关闭。什么是等待的正确方法?

我有一个 IsOpen("formname") 函数来检查表单是否仍然打开。

最佳答案

设置 WindowMode:=acDialog当您发起 DoCmd.OpenForm
这是从其他 Office VBA(Excel、Word、VB6、VB.Net)完成的方法
使用以下代码模态调用表单

Dim f as new FormNameHere
f.Show True 'True is the option for Dialog in VB
' form will be displayed until the user dismisses it then execution continues
set f = Nothing

除此以外:
f.ShowDialog

关于forms - 在 MS Access VBA 中等待表单关闭的最佳方式是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6446692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com