On my switchboard, for the Quit application command button I have the following code
If DCount("[tblJobOutcomes]![lngJobOutcome]", "[tblJobOutcomes]", "[tblJobOutcomes]![ysnSentByMailToStaff]=0") = 0 Then
Application.Quit
ElseIf DCount("[tblJobOutcomes]![lngJobOutcome]", "[tblJobOutcomes]"...