HelpContextId Property
Applies To
CommandBarButton object, CommandBarComboBox object, CommandBarControl object, CommandBarPopup object.
Description
Returns or sets the Help context ID number for the Help topic attached to the command bar control. Read/write Long.
Remarks
To use this property, you must also set the HelpFile property.
See Also
Help method, HelpFile property.
Specifics (Microsoft Access)
In Microsoft Access 97, you can use the Toolbar Control Properties dialog box for command bar controls to set the HelpContextId property for a control on a command bar. Display the Customize dialog box by pointing to Toolbars on the View menu and clicking Customize. For menu bar and toolbar controls, display the menu bar or toolbar, and then right-click the control whose HelpContextId property you want to set. For shortcut menu controls, select the Shortcut Menus check box on the Toolbars tab of the Customize dialog box, then find the shortcut menu control you want on the menu bar that's displayed and right-click the control. Click the Properties command. Enter the context ID number of the Help topic you want in the Help ContextID box.
Example
This example adds a custom report manager button to the File menu and specifies a Help topic to be displayed as that button's context-sensitive Help.
Set fileMenu = CommandBars _
.FindControl(Type:=msoControlPopup, Id:=fileID)
Set fileMenuDropdown = fileMenu.CommandBar
Set newButton = fileMenuDropdown.Controls _
.Add(Type:=msoControlButton, Before:=3)
With newButton
.Caption = "Open Report"
.DescriptionText = "Opens a quarterly report form"
.OnAction = "ReportManager"
.HelpFile = "C:\corphelp\custom.hlp"
.HelpContextID = 47
End With