|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Module.AddFromString Method (Access)
The AddFromString method adds a string to a Module object. The Module object may represent a standard module or a class module.
The AddFromString method places the contents of a string after the Declarations section and before the first existing procedure in the module if the module contains other procedures.
In order to add a string to a form or report module, the form or report must be open in form Design view or report Design view. In order to add a string to a standard module or class module, the module must be open.
This example creates a new form and adds a string and the contents of the Functions.txt file to its module. Run the following procedure from a standard module: