I am attempting to require certain field be populated with data, save the record, and open a new form in one Event procedure when a Comand Button is selected on Form. Unfortunately, this is erroring out on me or halt messages when attempting to run Macro certain intervals.
HAlT Message is Condition=True, Action Name=Close, Arguments Form, frm_CLLDateEntr y, prompt
My code:
HAlT Message is Condition=True, Action Name=Close, Arguments Form, frm_CLLDateEntr y, prompt
My code:
Code:
Private Sub Command36_Click()
Dim box As ComboBox
Dim box1 As ComboBox
Dim box2 As ComboBox
Set box = Me![LOB]
Set box1 = Me![CALL TYPE]
Set box2 = Me![CALL RESULT]
If IsNull(box) Then
MsgBox "You must select Line of Business", vbExclamation, "No Line of Business"
box.SetFocus
box.Dropdown
Cancel = True
ElseIf IsNull(box1) Then
MsgBox "You must select Call TYPE", vbExclamation, "No Call Result"
box1.SetFocus
box1.Dropdown
Cancel = True
ElseIf IsNull(box2) Then
MsgBox "You must select Call Result", vbExclamation, "No Call Type"
box2.SetFocus
box2.Dropdown
Cancel = True
End If
Dim stDocName As String
stDocName = "mcr_AddNew"
DoCmd.RunMacro stDocName
Exit_Command36_Click:
Exit Sub
End Sub
Comment