=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
Al Camp - 09 Dec 2005 23:42 GMT
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.

Signature
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
> =IIf([Confirmed] = "Yes", "Order Confirmed", "Order Not Confirmed")
> Displays the message "Order Confirmed" if the value of the Confirmed field
[quoted text clipped - 8 lines]
> Thank you very much.
> Martin
MacDermott - 09 Dec 2005 23:46 GMT
Put the first line of your post in the ControlSource of your textbox.
> =IIf([Confirmed] = "Yes", "Order Confirmed", "Order Not Confirmed")
> Displays the message "Order Confirmed" if the value of the Confirmed field
[quoted text clipped - 8 lines]
> Thank you very much.
> Martin
MRCUSA - 10 Dec 2005 00:04 GMT
Thank you very much indeed to both of you!
All perfect!
Martin
MRCUSA - 10 Dec 2005 00:32 GMT
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
fredg - 10 Dec 2005 00:54 GMT
> Can you make a Field "Not Visible" based on the Yes / No Value of another
> field?
[quoted text clipped - 3 lines]
>
> Martin
Single Form View?
Code the [CheckBox] AfterUpdate event:
[Payment].Visible = Not [CheckBox]
Place the same code in the Form' s Current event.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
MRCUSA - 10 Dec 2005 01:22 GMT
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.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
fredg - 10 Dec 2005 02:20 GMT
> Brilliant Fred! Thank you!
>
[quoted text clipped - 8 lines]
>
> 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.

Signature
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail