简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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