DoCmd.SelectObject method (Access)
The SelectObject method carries out the SelectObject action in Visual Basic.
Syntax
expression.SelectObject (ObjectType, ObjectName, InNavigationPane)
expression A variable that represents a DoCmd object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
ObjectType | Required | AcObjectType | An AcObjectType constant that specifies the type of object that you want to select. |
ObjectName | Optional | Variant | A string expression that's the valid name of an object of the type selected by the ObjectType argument. This is a required argument, unless you specify True (1) for the InNavigationPane argument. |
InNavigationPane | Optional | Variant | Use True to select the object in the Database window. Use False (0) to select an object that's already open. If you leave this argument blank, the default (False) is assumed. |
Remarks
Use the SelectObject method to select a specified database object.
The SelectObject action works with any Access object that can receive the focus. This action gives the specified object the focus and shows the object if it's hidden.
Example
The following example selects the Customers form in the Database window.
DoCmd.SelectObject acForm, "Customers", True
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기