开发者

VBA: What Does acDiaglog Mean?

I would like to know what does this "acDialog, x" means? it is VBA code.

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. 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. But this is not like a constructor, more like setting a property of the form object.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜