MsgBox from a Combo Box Selection

wjmorgan

New member
Local time
Today, 03:04
Joined
Apr 23, 2004
Messages
6
Any help would be appreciated!

I have a combo box populated with software solutions, when the sales person selects ONLY CERTAIN SOLUTIONS from the combo box I want it to prompt them to add the territory rep as well.

Example

I have solutions A,B,C,D,E,F,G in a combo box, if someone selects A or D or G then I want it to pop a msgbox and tell them to select data from another combo box and then set the focus on that box. Here is what I wrote but it just skips over it

Private Sub Solution_Change()

If Me.Solution = "Unicenter Argis" Then
MsgBox "This solution requires you to add the Territory/Specialist to this deal", vbCritical
Me.Add_CIC_Rep.SetFocus
Exit Sub
End If

End Sub

Not sure what I am missing? Thanks in advance!
 
wj,

Don't use the OnChange event, use BeforeUpdate or AfterUpdate instead.

Wayne
 
WayneRyan said:
wj,

Don't use the OnChange event, use BeforeUpdate or AfterUpdate instead.

Wayne


Tried that, didn't seem to work either? any other suggestions?
 
I got it, used the after update, the error was in the data types, the stored value was a number not a string...

Thanks for the help!
 

Users who are viewing this thread

Back
Top Bottom