Repository.Control.GetXfmeaControl

Returns a cXfmeaControl object that represents a given control resource in the current project. Returns nothing if the control does not exist or is not in the current project.

Syntax
.Control.GetXfmeaControl(ID)

Parameters
ID
 * Integer. The ID number of the control to retrieve.

Example
This example assumes that an Xfmea control with ID#1 exists in a repository. VBA MyRepository Repository MyRepository.ConnectToAccessRepository MyControl cXfmeaControl MyRepository.Project.SetCurrentProject(1) MyControl = MyRepository.Control.GetXfmeaControl(1) ControlName String ControlID Integer ControlName = MyControl.Name ControlID = MyControl.ID  MsgBox ( & ControlID &  & ControlName)

VB.NET MyRepository Repository MyRepository.ConnectToAccessRepository MyControl cXfmeaControl MyRepository.Project.SetCurrentProject(1) MyControl = MyRepository.Control.GetXfmeaControl(1) ControlName String ControlID Integer ControlName = MyControl.Name ControlID = MyControl.ID  MsgBox ( & ControlID &  & ControlName)