Skip to content

Latest commit

 

History

History
48 lines (27 loc) · 1.2 KB

Access.Form.OnConnect(property).md

File metadata and controls

48 lines (27 loc) · 1.2 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Form.OnConnect property (Access)
vbaac10.chm13536,vbaac10.chm5100
vbaac10.chm13536,vbaac10.chm5100
Access.Form.OnConnect
de181e49-ccba-52fa-f521-3e55f3ed78d2
03/09/2019
medium

Form.OnConnect property (Access)

Returns or sets a String indicating which macro, event procedure, or user-defined function runs when the OnConnect event occurs. Read/write.

Syntax

expression.OnConnect

expression A variable that represents a Form object.

Remarks

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.

Example

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]