J
jlute
I have an OnExit event that I want to prompt to do two things:
1. Change [Category] to "Unit" (by clicking OK).
2. Clear/don't save the [SubUnitQty] value (by clicking Cancel).
Can anyone please help me plug this into what I already have?
Thanks a bunch for your help!
If (Me!Category = "Case" Or Me!Category = "UnitLoad") Then
If Len(Me!SubUnitQty & vbNullString) > 0 Then
Beep
If MsgBox("The category for subcount packaging must be Unit!" &
vbCrLf & _
"Click OK to set the category to Unit.", vbOKOnly + _
vbQuestion) = vbOK Then
Me!Category = "Unit"
Cancel = False
DoCmd.GoToControl "UnitQty"
End If
End If
End If
1. Change [Category] to "Unit" (by clicking OK).
2. Clear/don't save the [SubUnitQty] value (by clicking Cancel).
Can anyone please help me plug this into what I already have?
Thanks a bunch for your help!
If (Me!Category = "Case" Or Me!Category = "UnitLoad") Then
If Len(Me!SubUnitQty & vbNullString) > 0 Then
Beep
If MsgBox("The category for subcount packaging must be Unit!" &
vbCrLf & _
"Click OK to set the category to Unit.", vbOKOnly + _
vbQuestion) = vbOK Then
Me!Category = "Unit"
Cancel = False
DoCmd.GoToControl "UnitQty"
End If
End If
End If