hi
My app has several forms, each with its own Help Button. The Help isn't the
standard Windows help style, but just 'home made' Dialog boxes. I am hoping
the Help buttons can open just one HelpForm with text determined by the
button being clicked. I have seen this done somewhere before, but I can't
locate the reference. Is there a good way to set this up? Many thanks for
any suggestions.
You can use, if you wish, a standard message box to do this.
You would then open this MsgBox from an event (a control's
double-click event?) on the form for which you want to display the
help message:
Private Sub Command12_Click()
' Message Box help information
MsgBox "Enter the number of Care Hours Worked weekly." & vbNewLine &
vbNewLine _
& "The date must always be the Saturday of the week worked." &
vbNewLine _
& "As long as the very first date is entered correctly," & vbNewLine _
& "all subsequent dates will be correct." & vbNewLine & vbNewLine _
& "To change an incorrectly entered date, Double-click" & vbNewLine _
& "on the 'Week Ending' field and change the date to the new date." &
vbNewLine _
& "*** Make sure it is a Saturday ***" & vbNewLine _
& "When the change is complete, tab to the next field." & vbNewLine &
vbNewLine _
& "If a therapist is off work due to illness or vacation," & vbNewLine
_
& "enter a zero in each field for each week they are off." & vbNewLine
_
& "If the therapist is to be gone for a longer period of time," &
vbNewLine _
& "finish the current month worked with zeroes," & vbNewLine _
& "then stop entering for that employee." & vbNewLine _
& "When that employee returns, add the first week worked," & vbNewLine
_
& "as usual, then change the date for that record by" & vbNewLine _
& "Double-clicking on the 'Week Ending' field of the record" &
vbNewLine _
& "and change the date (as indicated above)." & vbNewLine _
& "All subsequent dates will then pick up from this date.",
vbInformation, "Entry form Help"
End Sub
Each control's double-click event would have it's own message box
text.
---------------------------
If you do wish to create your own form then all you need do is have
one label, sized as large as needed, and one command button on it.
Leave the label caption blank.
Name the label "lblMessage"
Code the command button click event:
DoCmd.Close acForm, Me.Name
Code the form's Load event:
If Not IsNull(Me.OpenArgs) Then
Me!lblMessage = Me.OpenArgs
End If
Name this form "frmMessage".
You would then open this form from an event (a control's double-click
event?) on the form for which you want to display the help message:
Dim strMessage as String
strMessage = "This is my help message"
DoCmd.OpenForm "frmMessage", , , , , acDialog, strMessage
When the help form opens, processing stops until the command button on
the message form is clicked.