简体   繁体   English

VBA:acDiaglog是什么意思?

[英]VBA: What Does acDiaglog Mean?

I would like to know what does this "acDialog, x" means? 我想知道"acDialog, x"是什么意思? it is VBA code. 这是VBA代码。

Case "btnInfo"
      DoCmd.OpenForm "Info", , , , , acDialog, "x"

The "x" at the end is a parameter that gets sent to the form's OnLoad event and to its OpenArgs property. 最后的“ x”是一个参数,该参数被发送到表单的OnLoad事件及其OpenArgs属性。 It's basically a parameter that helps the form initialize itself somehow (think class constructor parameters). 它基本上是一个参数,可以帮助表单以某种方式初始化自身(请考虑类构造函数的参数)。

Should be 应该

OpenForm(FormName, View, FilterName, WhereCondition, DataMode, WindowMode, OpenArgs)
         "Info"  ,     ,           ,               ,         , acDialog, "x"

The dialog is the window mode for the form being opened, so open as a dialog. 对话框是正在打开的窗体的窗口模式,因此请以对话框形式打开。 The "x" is the open args, which will set the form's OpenArgs property, which subsequent code within the form can access. “ x”是打开的args,它将设置表单的OpenArgs属性,表单中的后续代码可以访问该属性。 But this is not like a constructor, more like setting a property of the form object. 但这不像构造函数,更像是设置表单对象的属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM