CreateDataAccessPage Method

CreateDataAccessPage Method

See Also         Example        

The CreateDataAccessPage method can create a new, blank data access page or open an existing HTML page as a data access page.

Syntax

object.CreateDataAccessPage filename [, createnewfile]

The CreateDataAccessPage method has the following arguments.

Argument Description
object The Application object.
filename A string expression identifying the name and path of the data access page.
createnewfile A Boolean value where True (-1) creates a new html page and link and False creates a new link to an existing html file. The default is True.

The following table shows the four possible setting combinations for the CreateDataAccessPage method and the results of those settings.

Filename Createnewfile Result
blank or new name and path True (-1) A new, minimized data access page is created and opened in Design view. A link to that page is created in the Pages object list of the Database window.
blank or new name and path False (0) An error occurs.
name of existing file and path False (0) A new uniquely named link is created that points to the existing data access page
name of existing file and path True (-1) An error occurs.

Remarks

You can use the CreateDataAccessPage method when designing a wizard that creates a new data access page.

The data access page you specify for filename can be a data access page that you have created specifically to be used as a template, or any other data access page in the database identified by the filename argument, and a setting of False for the createnewfile argument.

The CreateDataAccessPage method creates a minimized data access page. If you want to display the new data access page when created, you must use the Restore method.