Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to invoke a help ".hlp" file from vb code in access?

Status
Not open for further replies.

Paul7905

MIS
Jun 29, 2000
205
US
I have a need to call a "help" application provided by one of our suppliers from one of my Access forms. The help data was created using Microsoft Windows Help version 4.10.1995.

What I would like to do is when a user needs to view this help information when on a particular Access form, is to somehow allow the user to invoke this help app by clicking a button on the form. I have tried to use the Call Shell command as follows:

Dim AppName As String
AppName = "C:\GRNLITE\GLMSDS.GID"
Call Shell(AppName, 1)

When I try this, Access gives me the error message "INVALID PROCEDURE CALL OR ARGUEMENT"

Hope someone can help me here

thanks,
Paul
 
Specify the help file for the form ("Other" tab on properties for the form) and open it with the code:

SendKeys "{F1}", False

Fast and dirty!
 
If you have an other helpfile for the form you can change it before you activate it.

Private Sub cmdOpenSupplierHelp_Click()
Me.HelpFile = "NewHelpFile.hlp"
SendKeys "{F1}", False
Me.Helpfile = "DefaultHelpFile.hlp"
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top