Originally Posted by
June7
So do a nested If Then Else. What event do you have this code in?
If Me.status = "Closed" or Me.status = "Resolved" Then
'do this
Else
'run your original code
End If
I did think of that logic however i am a bit confused of the statement to use after the first then.
Code:
Private Sub btn_update_Click()
If Me.status = "Closed" or Me.status = "Resolved" Then
if IsNull (Me.[Resolution Time Frame]) then
MsgBox "Please Click on Resolution Time Frame", vbCritical, "Incomplete details"
ElseIf IsNull(Me.Service_Person) Then
MsgBox "Please Enter the Technician who worked on the fault", vbCritical, "Incomplete details"
ElseIf IsNull(Me.Cause) Then
MsgBox "Please enter the cause of fault identified by the technician ", vbCritical, "Incomplete details"
ElseIf IsNull(Me.Solution) Then
MsgBox "Please enter the the solution used to fix the fault", vbCritical, "Incomplete details"
Else
DoCmd.Save
End If
End Sub
Or
Code:
Private Sub btn_update_Click()
If Me.status = "Closed" or Me.status = "Resolved" Then
IsNull (Me.[Resolution Time Frame]) then
MsgBox "Please Click on Resolution Time Frame", vbCritical, "Incomplete details"
ElseIf IsNull(Me.Service_Person) Then
MsgBox "Please Enter the Technician who worked on the fault", vbCritical, "Incomplete details"
ElseIf IsNull(Me.Cause) Then
MsgBox "Please enter the cause of fault identified by the technician ", vbCritical, "Incomplete details"
ElseIf IsNull(Me.Solution) Then
MsgBox "Please enter the the solution used to fix the fault", vbCritical, "Incomplete details"
Else
DoCmd.Save
End If
End Sub