Hi,
I've got a if statement that doesn't work. The second part (the elseif statement) works fine, but even if I run the first part on its own, it doesn't want to work.
Code:
Private Sub cb_intercompany_code_AfterUpdate()
If cb_customer_grp_code.Value = "INTERCO" And IsNull(cb_intercompany_code) = True Then
MsgBox "You must complete an intercompany code when the customer grp code = INTERCO"
Me.cb_intercompany_code.SetFocus
ElseIf cb_customer_grp_code.Value <> "INTERCO" And IsNull(cb_intercompany_code) = False Then
MsgBox "You cannot complete an intercompany code when the customer grp code is not INTERCO"
Me.cb_intercompany_code.SetFocus
Me.cb_intercompany_code = Null
End If
End Sub
Any ideas as to why this might be?