Right, I have two combo boxes - let's call them cboStatus and cboResolutionDa te
Basically, what I want to happen, is when a user selects a certain option from cboStatus and cboResolutionDa te is blank, a message will pop up and inform the user that they need to enter a resolution date.
I can quite happily make a message box pop up when a user selects the appropriate status but can't figure out how to combine this with cboResolutionDa te being blank/null/empty.
This is one of my attempts...
I've tried changing it about a bit but the end result is always the same. It's probably a simple solution and I'm missing something really obvious.
I was also thinking I could throw in a SetFocus to cboResolutionDa te?
Thanks in advance!
Basically, what I want to happen, is when a user selects a certain option from cboStatus and cboResolutionDa te is blank, a message will pop up and inform the user that they need to enter a resolution date.
I can quite happily make a message box pop up when a user selects the appropriate status but can't figure out how to combine this with cboResolutionDa te being blank/null/empty.
This is one of my attempts...
Code:
Private Sub cboStatus_AfterUpdate() If Me!cboResolutionDate = "" And Me!cboStatus.ListIndex = 3 Or Me!cboResolutionDate = "" And Me!cboStatus.ListIndex = 4 Then MsgBox "Please enter a closure date", vbOKOnly, "Closure date missing!" End If End Sub
I was also thinking I could throw in a SetFocus to cboResolutionDa te?
Thanks in advance!
Comment