Message box from control on form

Q

Qaspec

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.
 
F

freakazeud

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
 
K

Klatuu

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
 

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