Message in a Text Box (IIf)

  • Thread starter Thread starter MRCUSA
  • Start date Start date
M

MRCUSA

=IIf([Confirmed] = "Yes", "Order Confirmed", "Order Not Confirmed")
Displays the message "Order Confirmed" if the value of the Confirmed field
is Yes; otherwise, it displays the message "Order Not Confirmed."


I found this on the Microsoft site, but it is not clear how to display a
message in a Text Box if the field [Confirmed] has a value of "Yes"

How can I get the message to display in a Text Box on my form, called
Text365 please?

Thank you very much.
Martin
 
Given that Confirmed and Text365 are both on the same form, place that
IIF statement in the ControlSource of Text365.
=IIf([Confirmed] = "Yes", "Order Confirmed", "Order Not Confirmed")

A minor point... it's always best to name your controls something that
makes sense to you, rather than use the default Access naming. I'd call
Text365... ConfirmedStatus.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

MRCUSA said:
=IIf([Confirmed] = "Yes", "Order Confirmed", "Order Not Confirmed")
Displays the message "Order Confirmed" if the value of the Confirmed field
is Yes; otherwise, it displays the message "Order Not Confirmed."


I found this on the Microsoft site, but it is not clear how to display a
message in a Text Box if the field [Confirmed] has a value of "Yes"

How can I get the message to display in a Text Box on my form, called
Text365 please?

Thank you very much.
Martin
 
Can you make a Field "Not Visible" based on the Yes / No Value of another
field?

If a booking is cancelled, (a check mark on the form), I would like the
payment field to be "Not Visible"

Martin
 
Can you make a Field "Not Visible" based on the Yes / No Value of another
field?

If a booking is cancelled, (a check mark on the form), I would like the
payment field to be "Not Visible"

Martin

Single Form View?
Code the [CheckBox] AfterUpdate event:

[Payment].Visible = Not [CheckBox]

Place the same code in the Form' s Current event.
 
Brilliant Fred! Thank you!

What is the positive of .Visible = Not ?

Thank you again, Martin

Single Form View?
Code the [CheckBox] AfterUpdate event:

[Payment].Visible = Not [CheckBox]

Place the same code in the Form' s Current event.
 
Brilliant Fred! Thank you!

What is the positive of .Visible = Not ?

Thank you again, Martin

Single Form View?
Code the [CheckBox] AfterUpdate event:

[Payment].Visible = Not [CheckBox]

Place the same code in the Form' s Current event.

I'm not sure of what you mean by
What is the positive of .Visible = Not ?

but if you are asking what the logic is in the above code, then
a CheckBox value is either -1 or 0.
In Access True is -1 and False is 0.
So..
If you write
[Payment].Visible = CheckBox
[Payment].Visible is either -1(True) or 0 (False) depending upon the
value of the Check Box which is also either -1 or 0.
The use of the word NOT switches the logic so [Payment].Visible =
True only when the CheckBox = 0 (False)

I hope this helps.
 
Back
Top