Realistically, this has nothing to do with Access. If you look at your code,
you should see several Declare statements that I would assume are referring
to hhctrl.ocx. (Since I don't know which KB code you're using, I can't
really offer anything specific.) That's where the results are coming from:
you're simply pointing to that ActiveX control to use its internal
functions.
Try to find hhctrl.ocx on the two machines and check whether it's the same
version. How is HelpFileName defined? If it's hard-coded, is it correct on
both machines?
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)
"Gordon Jones" <(E-Mail Removed)> wrote in message
news:67E9D598-DBE5-46CB-ABD7-(E-Mail Removed)...
>I am still trying to get consistent results out of my Access program
> (cbw5.mde) and its companion help file (CBW5Help.chm). I have inserted
> the
> special code and AutoKeys.F1 that has been published in Knowledge Base.
> In
> my development machine it works just as it should -- F1 or a (programmed)
> help button bring up the ContextID-linked help page.
>
> The key line in the inserted code is:
>
> hwndHelp = HtmlHelp(Application.hWndAccessApp, HelpFileName,
> HH_HELP_CONTEXT, MycontextID)
>
> With the same variables, on my development machine the return to hwndHelp
> is
> 592734 for a given form.
>
> If I copy the Access (CBW5.mdb or cbw5.mde) program into a second (test)
> machine and execute the same request for help, with the same input
> variables
> to the HtmlHelp() statement, the return to hwndHelpis 0 (zero).
>
> I would have thought that if i compile the program and run it on two
> machines, the executing code would be the same, and the results would be
> the
> same. Is there something outside the compiled Access program (e.g.
> ActiveX)
> that can be different on two different machines? If so, how can I ensure
> that the working level of that function gets taken along when I compile my
> CBW5.mde program?
>
> Thanks in advance,
>
>
> --
> Gordon Jones