Message Box Condition

S

Stevene James

Hi,

I have a drop down box with active, on hold, pending etc...

i would like a message box to pop and/or large red text to appear elsewhere
on the form if the status in the drop down box is say set to 'one hold',
whats the easiest way to do this.

Many Thanks
 
A

Allen Browne

Set the Control Source of your large text box to:
=IIf([Combo1]="on hold", "Warning Message", Null)
 
S

Stevene James

what if there were multiple values i.e on hold, suspended,blocked, but all
displayed same message

Allen Browne said:
Set the Control Source of your large text box to:
=IIf([Combo1]="on hold", "Warning Message", Null)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Stevene James said:
I have a drop down box with active, on hold, pending etc...

i would like a message box to pop and/or large red text to appear
elsewhere
on the form if the status in the drop down box is say set to 'one hold',
whats the easiest way to do this.

Many Thanks
 
A

Allen Browne

A combo can have only one value in one record, so I'm not clear what you
mean.

If you are talking about a continuous form, where the combo has different
values on different rows, the expression should work.

If you want to display the message for several different possible types,
change the 1st argument of the combo to include all the choices, e.g.:
=IIf(([Combo1]="on hold") Or ([Combo1]="pending") Or ([Combo1]="active"),
"Warning Message", Null)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Stevene James said:
what if there were multiple values i.e on hold, suspended,blocked, but all
displayed same message

Allen Browne said:
Set the Control Source of your large text box to:
=IIf([Combo1]="on hold", "Warning Message", Null)

Stevene James said:
I have a drop down box with active, on hold, pending etc...

i would like a message box to pop and/or large red text to appear
elsewhere
on the form if the status in the drop down box is say set to 'one
hold',
whats the easiest way to do this.

Many Thanks
 
Top