开发者

VBA: What Does acDiaglog Mean?

开发者 https://www.devze.com 2022-12-15 20:48 出处:网络
I would like to know what does this \"acDialog, x\" means? it is VBA code. Case \"btnInfo\" DoCmd.OpenForm \"Info\", , , , , acDialog, \"x\"

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

精彩评论

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