We have created help file (.chm) using HTML Help Workshop,
In Access 2007 database Form property, we have set "Help File" = HelpApp.chm and "Help Context ID" propertiey = 1001, so when we press F1 it opens the help file with this context ID.
The problem is when we press F1 multiple times(once each for different form or help topic) it opens multiple instances of the help file. Also I observed if I press F1 on same form multiple times, it opens multiple instances as well.
We don't want to create multiple instances of help file.
How we can prevent openning the multiple instances of help file?
Database Application being developed in Microsoft Access 2007 , .accdb file format.
Help file being created HTML Help workshop 4.74.8702.0
I searched internet but there was no article that has multiple help file instances opening issue in Microsoft Access application. But there is one article that discusses for C# application,
How do I limit my Windows application to spawning a single instance of a process?
I don't know if the above solutions, to check whether the Process has exited ? OR ProcessStartInfo ? but I need this in VBA.
This problem is difficult and depends on how the help is invoked. You must give some more information and the calling VBA code. I have seen your issue with multiple instances of the help window only once after moving the Access window to a new position followed by pressing the F1 button. But never seen again yet.
One thing I remember is a problem with hh.dat. The hh.dat file stores user-specific information on all the HTMLHelp files (*.CHM) on your system (position, favourite topics, search history, etc.), and can cause a error if it has somehow been corrupted. Delete or rename the file hh.dat to reset all (!) CHM windows on your system to their default settings. You should find hh.dat in this directory:
\Documents and Settings\%username%\Application Data\Microsoft\HTML Help or
C:\Users\%username%\AppData\Roaming\Microsoft\HTML Help
Windows will create a new version of hh.dat when you next open any .chm file.
Try to set F1 to AutoKeys (see snapshot).
Add a modul for invoking help by HTMLHelp API (see code sample):