megatronixs
Registered User.
- Local time
- Today, 23:03
- Joined
- Aug 17, 2012
- Messages
- 719
Hi all,
I need to pop up a message box if a criteria is met.
I have in a form a field "Business" that could have 2 values "Type 1" and Type 2"
There is a combo box "Material" with about 20 values, but the message box needs to pup up if "Type 1" in "business" is selected and one of the following in the combo box "Wood", "Metal" and the message box will say "You really want to change this" and then for Type 2, "Plastic", "Carton", "Stone"
I have so far the below code:
It should do nothing if no one of the above is selected and leave the combo box with the previous value. The message box is just to make sure the user is aware of the change.
Greetings.
I need to pop up a message box if a criteria is met.
I have in a form a field "Business" that could have 2 values "Type 1" and Type 2"
There is a combo box "Material" with about 20 values, but the message box needs to pup up if "Type 1" in "business" is selected and one of the following in the combo box "Wood", "Metal" and the message box will say "You really want to change this" and then for Type 2, "Plastic", "Carton", "Stone"
I have so far the below code:
Code:
Select Case Business
Case Is = "Plastic", "Carton", "Stone" And Me.Material = "Type 2"
MsgBox ("You really want to change this!!!")
Case Is = "Wood", "Metal" And Me.Material = "Type 1"
MsgBox ("You really want to change this!!!")
Case Else
DoCmd.CancelEvent
End Select
It should do nothing if no one of the above is selected and leave the combo box with the previous value. The message box is just to make sure the user is aware of the change.
Greetings.