MS Access: Browser Based Help from a button on your form
|You can import the required module mOpenHyperLink from the Access demo
database which you can download from here: msaccess_activating_help.zip
Calling the opening of a html page on a browser is easy. In it's most
primitive form you only need to call the OpenHyperLink procedure as in the
downloaded database module mOpenHyperLink. This in turn will call the windows
"shell32.dll" , that's all. The code below is optional. It has the
advantage that you don't have to include the full path to your topic page each
time. In addition it shows how to specify the url in case of file server versus
web server, and gives the correct direction of the slash as part of the
- Import module mOpenHyperLink from the downloaded database.
- By default the help opens from the file server. If you want to open from
the Internet, change the line
MyOpenHyperlink strTopicPage As String
, Optional bOnTheInternet As Boolean
, Optional bOnTheInternet As Boolean = True
- In addition, you will need to specify the folder on the web server you will
be using. Replace the http://... part.
strHTMLfilesFolder = "http://helpgenerator.com/help/msaccess"
- Open the form you want to add the help button to in Design mode
- Add a [Help] button to a form
- Set the button property name to 'cmdHelp'
- Right-click on the newly created button
- Select 'Build Event'
- Select Code Builder and click OK
- The VB editor opens with Private Sub 'cmdHelp_Click() ... End Sub
- Insert code so that the result looks like below one of below:
Other ways to call MyOpenHyperlink:
- MyOpenHyperlink "Add_code_to_activate_help.htm"
JsOpenInFrame) is included, it will automatically open the frame page help.htm
so that navigation features are made available.
- MyOpenHyperlink "help.htm?Add_code_to_activate_help.htm"
|The http address is specified in MyOpenHyperlink