I need help with opening a help file

  • Thread starter Afrosheen via AccessMonster.com
  • Start date
A

Afrosheen via AccessMonster.com

I have a form that when I open it will display the help file. Every time I
try this I get the Open, Save, or Cancel commands.

This is the code I'm trying to use.
Me.WebBrowser0.Navigate "e:\nci database\nci taps\working taps\taps 03-03\
taps-help.chm"

I don't care if it opens in a browser or not I just want it to display the
help file and its content.

I know I can set the Help File and Help Context Id for the individual
screens. This is the main help file I'm trying to display.

Thanks for your help.
 
A

Afrosheen via AccessMonster.com

Thanks for getting back to me Doug..
Here's what I did.

I had a menu tool bar so I just added the new menu

I copied and pasted the code in to a new module
I created a new macro called MacHelp with
RunCode
Function Name: ShowContents

I made sure the MyHelp.chm file was the same location as the database.
I get the error: Can not find the name ShowContents

I don't think I've entered the wrong information
See whether what David Liske has at
http://frogleg.mvps.org/helptechnologies/htmlhelp/hhaccess.html helps.
I have a form that when I open it will display the help file. Every time I
try this I get the Open, Save, or Cancel commands.
[quoted text clipped - 10 lines]
Thanks for your help.
 
D

Douglas J. Steele

Is this a stand-alone module, or is it a class module, or a module
associated with a form or report?

What's your code for ShowContents?

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Afrosheen via AccessMonster.com said:
Thanks for getting back to me Doug..
Here's what I did.

I had a menu tool bar so I just added the new menu

I copied and pasted the code in to a new module
I created a new macro called MacHelp with
RunCode
Function Name: ShowContents

I made sure the MyHelp.chm file was the same location as the database.
I get the error: Can not find the name ShowContents

I don't think I've entered the wrong information
See whether what David Liske has at
http://frogleg.mvps.org/helptechnologies/htmlhelp/hhaccess.html helps.
I have a form that when I open it will display the help file. Every time
I
try this I get the Open, Save, or Cancel commands.
[quoted text clipped - 10 lines]
Thanks for your help.
 
A

Afrosheen via AccessMonster.com

Stand alone module called: MyHelp
In the macro I just have: ShowIndex
This is part of the code in the module

Public Function ShowIndex() As Long
ShowIndex = HTMLHelpStdCall(0, "myhelp.chm", HH_DISPLAY_INDEX, 0)
End Function
Is this a stand-alone module, or is it a class module, or a module
associated with a form or report?

What's your code for ShowContents?
Thanks for getting back to me Doug..
Here's what I did.
[quoted text clipped - 20 lines]
 
D

Douglas J. Steele

If you go to the Immediate Window (Ctrl-G), type ?ShowIndex() and hit Enter,
does it work?

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Afrosheen via AccessMonster.com said:
Stand alone module called: MyHelp
In the macro I just have: ShowIndex
This is part of the code in the module

Public Function ShowIndex() As Long
ShowIndex = HTMLHelpStdCall(0, "myhelp.chm", HH_DISPLAY_INDEX, 0)
End Function
Is this a stand-alone module, or is it a class module, or a module
associated with a form or report?

What's your code for ShowContents?
Thanks for getting back to me Doug..
Here's what I did.
[quoted text clipped - 20 lines]
Thanks for your help.
 
A

Afrosheen via AccessMonster.com

Hi Doug,
I did the ?showindex() and debug.print showindex() and both came up with a
number 0
If you go to the Immediate Window (Ctrl-G), type ?ShowIndex() and hit Enter,
does it work?
Stand alone module called: MyHelp
In the macro I just have: ShowIndex
[quoted text clipped - 14 lines]
 
A

Afrosheen via AccessMonster.com

Doug I didn't use this code because I thought that because the chm file is in
the same folder as the database it should work. Am I correct? If I have to
use it, do I have to create a form for this?

Again Thanks for your help..


Left$(CurrentDB.Name, Len(CurrentDB.Name) - Len(Dir(CurrentDB.Name)))
or, more efficiently:
Dim strFullPath As String
Dim strPathOnly As String
strFullPath = CurrentDB.Name
strPathOnly = Left$(strFullPath, Len(strFullPath) -
Len(Dir(strFullPath)))
If you go to the Immediate Window (Ctrl-G), type ?ShowIndex() and hit Enter,
does it work?
Stand alone module called: MyHelp
In the macro I just have: ShowIndex
[quoted text clipped - 14 lines]
 
A

Afrosheen via AccessMonster.com

Good Morning Doug;
I don't know what I did. I must have had my nose pointing the right way or I
was scratching my back or something, but it seems to be working now.

I did a test with another module that I knew was working called mouseOn().
When I just put mouseOn Access couldn't find it. When I put mouseon, access
couldn't find it. When I put mouseOn() then it found it and worked. So, I
went back through the Macros and changed everything to the way the function
was spelled and Vola! it started working.

Thanks for your help with this. I really appreciate it.
If you go to the Immediate Window (Ctrl-G), type ?ShowIndex() and hit Enter,
does it work?
Stand alone module called: MyHelp
In the macro I just have: ShowIndex
[quoted text clipped - 14 lines]
 
D

Douglas J. Steele

You need to fully qualify the path to the chm file.

Since David wrote his article, though, Access introduced an easier way to
determine the path of the current database.

Try

ShowIndex = HTMLHelpStdCall(0, CurrentProject.Path & "\myhelp.chm",
HH_DISPLAY_INDEX, 0)

Sorry I missed that before.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

Afrosheen via AccessMonster.com said:
Doug I didn't use this code because I thought that because the chm file is
in
the same folder as the database it should work. Am I correct? If I have to
use it, do I have to create a form for this?

Again Thanks for your help..


Left$(CurrentDB.Name, Len(CurrentDB.Name) - Len(Dir(CurrentDB.Name)))
or, more efficiently:
Dim strFullPath As String
Dim strPathOnly As String
strFullPath = CurrentDB.Name
strPathOnly = Left$(strFullPath, Len(strFullPath) -
Len(Dir(strFullPath)))
If you go to the Immediate Window (Ctrl-G), type ?ShowIndex() and hit
Enter,
does it work?
Stand alone module called: MyHelp
In the macro I just have: ShowIndex
[quoted text clipped - 14 lines]
Thanks for your help.
 
A

Afrosheen via AccessMonster.com

Thanks Doug. I changed all the functions and it seemed to work a little
faster.
I saved David's web page as a pdf, so I'll go in and change it for future
references.

Thanks again for your help.
You need to fully qualify the path to the chm file.

Since David wrote his article, though, Access introduced an easier way to
determine the path of the current database.

Try

ShowIndex = HTMLHelpStdCall(0, CurrentProject.Path & "\myhelp.chm",
HH_DISPLAY_INDEX, 0)

Sorry I missed that before.
Doug I didn't use this code because I thought that because the chm file is
in
[quoted text clipped - 20 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top