DoCmd.BrowseTo (Access)

The BrowseTo method performs the BrowseTo action in Visual Basic.

Use the BrowseTo method to navigate between objects in place. You can also change the source object of a subform control by specifying the PathtoSubformControl argument. You can use BrowseTo to navigate from Form1 to Form2 without opening up a new window. The PathtoSubformControl argument must be specified by using the syntax in the following example.

BrowseTo (ObjectType, ObjectName, PathtoSubformControl, WhereCondition, Page, DataMode)


Main Form.SubForm Ctrl 1>Form 2.SubForm Ctrl 2>Form 3.SubFormCtrl3

Arguments

The following arguments are required:

ObjectType (AcBrowseToObjectType) - The object type to which to browse.

Possible return values are acBrowseToForm - Open a form, acBrowseToReport - Open a report.

ObjectName (String) - The object that loads inside the subform control referenced by the PathtoSubformControl argument.

Optional arguments

The following arguments are optional

PathtoSubformControl (String) - If specified, the path from the main form of the application to the target subform control that loads the object specified by the ObjectName argument.

WhereCondition (String) - If specified, replaces the Where condition of the object record source.

Page (Page) - If specified, sets the page of the continuous form that will be made the current page. This argument is web only.

DataMode (AcFormOpenDataMode) - If specified, the data entry mode of the form.


Possible values are

acFormAdd The user can add new records but can't edit existing records.
acFormEdit The user can edit existing records and add new records.
acFormPropertySettings The user can only change the form's properties.
acFormReadOnly The user can only view records.