[OrderRes, [CompDt]and [CompBy]
If the [OrderRes] = “5 DAY LETTER” (ID 16). User should not be able to add a [CompDt] and or [CompBy]
If a user selects a [Order Result] other than “ 5 DAY LETTER” (ID 16), [CompDt] and [CompBy] are required.
If [OrderRes], [CompBy] and [CompDate] are null okay to [exit]
How would I write this code? Can some please provide a example?
This is what I've done thus far... not sure if it will work, but I don't know how to include all the scenarios:
Expand|Select|Wrap|Line Numbers
- If IsNull (Me.OrderRes] And IsNull(Me.CompDt) And IsNull(Me.CompBy) then
- DoCmd.Close
- ElseIf IsNull(Me.CompDt) = False or IsNull(Me.CompBy) = False then
- If Me.OderRes = “5 DAY LETTER” THEN
- DoCmd.Close
- Else
- MsgBox "Remove Completion updates"
- End If
- End If
Thanks in advance for you help,
Anthony