paulnnosh
MIS
- Mar 25, 2004
- 32
Hi,
I have a form with several text boxes. When I click the save button I'd like to run some code to check that if the status field is set to "C" that the closed details are also populated.
I have the following IF statement:
If Me.Status = "C" Then
If Me.cboClosedCode = Null Then
MsgBox "If the prospect is closed you must enter a closed code and closed details"
End If
End If
However when I run this it still saves the record. I know this is because once I click OK on the msgbox the processing just carries on. Is there anyway I can stop it?
Thanks for any help.
I have a form with several text boxes. When I click the save button I'd like to run some code to check that if the status field is set to "C" that the closed details are also populated.
I have the following IF statement:
If Me.Status = "C" Then
If Me.cboClosedCode = Null Then
MsgBox "If the prospect is closed you must enter a closed code and closed details"
End If
End If
However when I run this it still saves the record. I know this is because once I click OK on the msgbox the processing just carries on. Is there anyway I can stop it?
Thanks for any help.