MS Access: starting help from code
To add a Help button or menu with help options to your application, you have
to add a little VBA code to your application.
Deploying the help: browser based help or CHM file
Before adding the code lies the decision on how to deploy the help. If you
based help you can deploy your application without having to include any
help files. If you choose HTML Help (CHM), you are
giving your user a better help system. You then have to only include the chm
file - not the individual topic (.htm) or other files.
|Publishing the browser based
help on your website gives you an excellent extra way to promote your
application - SEO. You can do this independent of your decision to distribute a
chm files with it.
|You can import the required modules from the Microsoft Access demo database
which you can download from here: msaccess_activating_help.zip
Look at the sample code
- Download the file Microsoft Access demo database.
- Unzip the contents in a folder (e.g. c:\temp\hgaccessdemo)
- Open the database acchelpDemo.mdb
- In the database there are Forms to show how to call the help, and some
modules with supporting code modules and classes which you will need to add to
- Open the form HelpToolbar in design mode
- Select the [Index] button (scroll down to the bottom of the form)
- Right-click on the button and select 'Build Event'
This will take you to the code from the button which is used to open the Help
File with the Index tab selected.
Do the same with your database
As the demo indicates, there are basically four ways to do the help:
- F1 support: see Set Help file and
contextId - this behavior should automatically work after you run the
Help Generator add-in your Access database.
|F1 in MS Access 2003 only shows the topic page, not the navigation
pane. As a workaround you can add a [Help] button to each form - see
- HTML Help
(CHM) from a button on your form
Help (CHM) from a button -TOC - index - search
Based Help from a button on your form