MsgBox to

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top