Jeff said:
Trying again:
If (Me.Steps = 0 Or Me.Equip = 0 Or Me.Consequences = 0 Or Me.SHE =
0 Or Me.PPE = 0 Or Me.Format = 0 Or Me.Grammar = 0) AND
IsNull(Me.Comments) Then
MsgBox "Please enter comments in the bottom of this form
indicating all problems found with procedure."
Me.Comments.SetFocus
Exit Sub 'We don't want to close the form because we need to add
Comments
End IF
DoCmd.OpenForm "Start Up"
DoCmd.Close acform, "MainFormName"
End Sub
Private Sub CloseSave_Click()
If Me.Steps = 0 Or Me.Equip = 0 Or Me.Consequences = 0 Or Me.SHE = 0 Or
Me.PPE = 0 Or Me.Format = 0 Or Me.Grammar = 0 Then
If IsNull(Me.Comments) Then
MsgBox "Please enter comments indicating all problems with this
procedure."
Me.Comments.SetFocus
DoCmd.CancelEvent
ElseIf Me.Steps = 0 Or Me.Equip = 0 Or Me.Consequences = 0 Or Me.SHE =
0 Or Me.PPE = 0 Or Me.Format = 0 Or Me.Grammar = 0 Then
If Not IsNull(Me.Comments) Then
Select Case MsgBox("Would you like to save this review?", _
vbYesNoCancel + vbQuestion, "Save Review?")
Case vbNo 'User does not want to save changes
Me.Undo
Case vbCancel 'User Cancelled the action
Exit Sub
Case Else 'Must have said "Yes"
'Just let it save and close
End Select
DoCmd.Close
ElseIf Me.Steps =-1 And Me.Equip =-1 And Me.Consequences =-1 And Me.SHE
=-1 And Me.PPE =-1 And Me.Format =-1 And Me.Grammar =-1 Then
Select Case MsgBox("Would you like to save this review?", _
vbYesNoCancel + vbQuestion, "Save Review?")
Case vbNo 'User does not want to save changes
Me.Undo
Case vbCancel 'User Cancelled the action
Exit Sub
Case Else 'Must have said "Yes"
'Just let it save and close
End Select
DoCmd.Close
End If
End If
End If
End Sub
Okay, this works for all Ifs except the last one. -1 means yes, I
tried that and =<0, neither the msgbox nor the close action worked.
Any ideas? Thanks again for all of your help.