Form, Report.
You can use the Module property to specify a form module or report module.
The Module property is available only in Visual Basic and is read-only in all views.
You can use this property only with the InsertText method to specify the module you want to insert code into.
InsertText Method.
The following example uses the Module property to insert the Beep method into the form Open event.
Dim strFormOpenCode As String= "Sub Form_Open(Cancel As Integer)" & vbCrLf & _ "Beep" & strCRLF & "End Sub"![MyForm].Module.InsertText strFormOpenCode