Message Box for a Combo Box

Crackers

Registered User.
Local time
Today, 20:23
Joined
May 31, 2002
Messages
36
I have a ComboBox [cmb111] that contains a '+' & a '-'. Next to this I have a text box that contains a $ amount. The operatives are required to press the combo box indicating if there is an Increase or Decrease and then type in the amount in the text box. After this has been done, the cursor moves onto the next combo box.
If the operative forgets to press the '+' or '-' I need a Message Box to appear that will remind the operative to press this.
I have tried the following code but it doesn't work. I tried to use Access help as a guideline but to no avail.

After Update function on the Textbox:

If Me.cmb111 Is Null
Then MsgBox(Select Increase or Decrease[, vbOKOnly] [, Selection Required] [, helpfile, context])

This is as far as I can get and then I'm stuck.
Could somebody please help me out with this? Thank you very much for your help.
 
In the Table (field "cmb111") put (Field Properties) Required YES.
 
If Me.cmb111 Is Null
Then MsgBox(Select Increase or Decrease[, vbOKOnly] [, Selection Required] [, helpfile, context])


Try something like this

if nz(me.cmb111,"") = "" then
msgbox"Select Increase or Decrease",vbokonly,"Selection Required"
me.cmb111.setfocus
exit sub
end if
 

Users who are viewing this thread

Back
Top Bottom