Microsoft Office 2000/Visual Basic Programmer's Guide |
Implementing context-sensitive Help for interface elements in Access forms is similar to the process of defining context-sensitive Help for UserForms, except the form and control properties you set are slightly different. In addition, you can specify different Help files for each form, and specify the window type in which to display the topic. To display the topic in a full WinHelp 4.0 Help window, enter the context ID as a positive value; that is, enter it exactly as it is defined in your .hlp file. To display the topic in a small borderless pop-up window that appears adjacent to the interface element, precede the context ID with a minus sign ( – ). Note that this does not mean you need to use negative values for context IDs when authoring your .hlp file; you need only precede the authored value with a minus sign.
To define context-sensitive Help for Access forms
If you don't want to include the full path to the Help file, omit steps 2 and 3 and add code to the form's Load event that specifies the path by using the form's HelpFile property and the CurrentProject object's Path property. For example:
Dim strHelpPath As String
strHelpPath = CurrentProject.Path & "\samplepopups.hlp"
Me.HelpFile = strHelpPath