title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Form.OnConnect property (Access) |
vbaac10.chm13536,vbaac10.chm5100 |
|
|
de181e49-ccba-52fa-f521-3e55f3ed78d2 |
03/09/2019 |
medium |
Returns or sets a String indicating which macro, event procedure, or user-defined function runs when the OnConnect event occurs. Read/write.
expression.OnConnect
expression A variable that represents a Form object.
Valid values for this property are:
-
macroname, where macroname is the name of a macro.
-
[Event Procedure], which indicates the event procedure associated with the OnConnect event for the specified object.
-
=functionname(), where functionname is the name of a user-defined function.
The following example specifies that when the OnConnect event occurs on the first form of the current project, the associated event procedure should run.
Forms(0).OnConnect = "[Event Procedure]"
[!includeSupport and feedback]