Hello
I have this code
What is the proper code to have a field's value determined by the Yes/No response?
I want a Yes/No field on the to be switched to "YES" if the user hits the Yes response on the msgbox.
Thank you!
I have this code
Code:
Private Sub TestResult_BeforeUpdate(Cancel As Integer)
If Me.TestResult < DLookup("MinValue", "QCSpecs", "ProductCode='" & Forms!QC2EntryForm!ProductCode _
& "' and TestName = '" & Forms!QC2EntryForm![QC2TestResults subform].Form.TestName & "'") Or Me.TestResult > _
DLookup("MaxValue", "QCSpecs", "ProductCode='" & Forms!QC2EntryForm!ProductCode _
& "' and TestName = '" & Forms!QC2EntryForm![QC2TestResults subform].Form.TestName & "'") Then
MsgBox "The test result is out of spec. Press Yes to reject the sample or No to return to the form.", vbYesNo
End If
End Sub
What is the proper code to have a field's value determined by the Yes/No response?
I want a Yes/No field on the to be switched to "YES" if the user hits the Yes response on the msgbox.
Thank you!