다음을 통해 공유


DoCmd.BrowseTo Method (Access)

The BrowseTo method performs the BrowseTo action in Visual Basic.

Version Information

추가된 버전: Access 2010

Syntax

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

A variable that represents a DoCmd object.

Parameters

Name

Required/Optional

Data Type

Description

ObjectType

필수

AcBrowseToObjectType

The object type to which to browse.

ObjectName

필수

Variant

The object that loads inside the subform control referenced by the PathtoSubformControl argument.

PathtoSubformControl

선택

Variant

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

선택

Variant

If specified, replaces the Where condition of the object record source.

Page

선택

Variant

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.

Remarks

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 using the syntax in the following example:

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

In this example, the Main Form is the top level form in the Access client application. The PathToSubFormControl argument must alternately specify form and subform control names leading from the main form to the subform control that is the container of the object specified by the ObjectName argument. Each subform control specified must be a control on the form that precedes it. The path must end with a subform control.

Example

The following code example opens the "EventDS" form in place in edit mode in the "NavigationSubform" subform control of the "Main" form.

DoCmd.BrowseTo ObjectType:=acBrowseToForm, _ 
ObjectName:="EventDS", _ 
PathToSubformControl:="Main.NavigationSubform", _ 
WhereCondition:="", _ 
Page:="", _ 
DataMode:=acFormEdit

참고 항목

개념

DoCmd Object

DoCmd Object Members