I'm trying to set a checkbox field in my table based on what the user enters into another field. The following code does everything right (display the box as the user leaves the field, accept the click and disappear) except actually set the checkbox value. I don't get an error. Am I using the wrong value for "Yes"? Or what?
Private Sub Category_AfterU pdate()
On Error GoTo Err_Category_Af terUpdate
Dim myVAR As Byte
'Make the user specify whether this IUR needs Radiology's signature
If Me.Category.Val ue = "MRI" Then
mVAR = MsgBox("Does Radiology need to sign this?", vbYesNo + vbQuestion)
End If
'If so, set the tag; otherwise, do nothing
If myVAR = vbYes Then
Me.Rad_Sig.Valu e = -1
End If
Exit_Category_A fterUpdate:
Exit Sub
Err_Category_Af terUpdate:
MsgBox Err.Description
Resume Exit_Category_A fterUpdate
End Sub
Thanks!
Private Sub Category_AfterU pdate()
On Error GoTo Err_Category_Af terUpdate
Dim myVAR As Byte
'Make the user specify whether this IUR needs Radiology's signature
If Me.Category.Val ue = "MRI" Then
mVAR = MsgBox("Does Radiology need to sign this?", vbYesNo + vbQuestion)
End If
'If so, set the tag; otherwise, do nothing
If myVAR = vbYes Then
Me.Rad_Sig.Valu e = -1
End If
Exit_Category_A fterUpdate:
Exit Sub
Err_Category_Af terUpdate:
MsgBox Err.Description
Resume Exit_Category_A fterUpdate
End Sub
Thanks!
Comment