Hi, this seems simple and I have tried several things to get it to work.
I have a field on a form that's a dropdown box. What I want to happen is when the option "Other Companies" is selected, it forces an entry to be made in the comments field. I also want to have a message box come up telling them to do so.
I have tried;
Its expecting an equal sign. I don't think that the If statement should be used here to call the MsgBox. I tried having it call a Macro with a MsgBox but it expected an equal sign as well.
Can anyone help?
Thanks in advance.
I have a field on a form that's a dropdown box. What I want to happen is when the option "Other Companies" is selected, it forces an entry to be made in the comments field. I also want to have a message box come up telling them to do so.
I have tried;
Code:
Private Sub Reason_AfterUpdate()
If (Me!Reason) = "Other Companies" Then
MsgBox ("Comments must be entered",vbOKOnly,,,) As VbMsgBoxResult
End if
Its expecting an equal sign. I don't think that the If statement should be used here to call the MsgBox. I tried having it call a Macro with a MsgBox but it expected an equal sign as well.
Can anyone help?
Thanks in advance.