Accessing help from a button...


Question

Is there a way to make Access open up the Help system to the Index tab from a button on a form without using the Microsoft Common Dialog control?

Answer

From: Shamil Salakhetdinov <shamil@marta.darts.spb.ru>
To: <ACCESS-L@PEACH.EASE.LSOFT.COM>
Subject: Re: Accessing help from a button...
Date: 31 March 1999 11:47

Shawn,

This code:

Private Const HELP_PARTIALKEY = &H105

Private Declare Function smsWinHelp Lib "User32" _
                         Alias "WinHelpA" ( _
                         ByVal Hwnd As Long, _
                         ByVal strHelpFile As String, _
                         ByVal intCommand As Long, _
                         anydata As Any) As Long

Public Sub smsHelpSearchForKeyWord( _
                pstrHelpPath As String, _
                pstrSearch As String, _
                Optional plngHwnd As Long = 0&)

  On Error GoTo smsHelpSearchForKeyWord_Exit

  smsWinHelp plngHwnd, pstrHelpPath, _
             HELP_PARTIALKEY, ByVal pstrSearch

smsHelpSearchForKeyWord_Exit:
End Sub

works Ok for me, e.g.

smsHelpSearchForKeyWord "c:\winnt\system32\joy.hlp","midi"

HTH, Shamil


HOME    TOPICS

Copyright © 1999 by Shamil Salakhetdinov.
All rights reserved. Terms of use.

Last updated: October 10, 2006

Published also here at 4TOPS: Accessing help from a button...