Message box from control on form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form "frmEntry" with a combo box named "StatCom" that lists the
status of a record, "open" or "closed". I am trying to get a message box to
appear with instructions when a user selects either "open" or "closed" from
that control. The instructions would inform the user on how to enter data for
the rest of the form. If the user selects open - "Please enter your follow up
time in the date section" if the user selects closed - "Please note the owner
and resaon in the comments section."

Thanks for any help.
 
Hi,
there are three possibilities. Either you create a custom form which says
what you want depending on the selection and you call this form on the after
update event of the combobox! OR you use a msgbox as you intended:

If Me.YourCombo.Value = "open" Then
Msgbox("Whatever!")
Else
MsgBox("Something else")
End If

Or you use the controls tooltiptext property.
HTH
Good luck
 
Use the After Update event of the combo box:

Dim strMsg as String

If Me.StatCom = "open" Then
strMsg = "Please enter your follow up time in the date section"
Else
strMsg = Please note the owner and resaon in the comments section."
End If
MsgBox strMsg
 
Back
Top