Ask Your Question

Revision history [back]

I have solved my problem!

I made use of the WriteDbgInfo in the Tools.Debug module to examine the helpButton.

I now have an identical help button on all my forms on which the targetURL is created when the form is loaded this calls a form initialisation routine that in turn calls this help setup routine.

public sub setHelp(frm as object, ofrm as object, HelpNo as integer)
' frm is created in the calling routine the initialises the form
' ofrm is the argument that's passed on the form loading 
'    that calls the initialisation routine
' HelpNo is the swticboard Key used to get the Hel HTML file
' HelpDir is created in getReferences routine & is dependent on the OS
'    it points to the application support directory. 
dim helpHtmlFile    as string
dim oBtn            as object

'make the form's the help button visible or not
    if HelpSwitch then
' get the help html file
        helpHtmlFile=dlookup("[helpHtml]","[SwitchBoard Items]","[switchboardKey]=" & cstr(HelpNo))
        if isNull(helpHtmlFile) then helpHtmlFile="WelcometotheSecretaryBird"
        helpHtmlFile=HelpDir &  helpHtmlFile & ".html"
        oBtn = ofrm.source.getByName("HelpButton")
end sub