I tried to incorporate 'due' and 'overdue' but have missed something,,
something very simple I'm sure. If anyone can crack me in the head and
set
me straight it would be much appreciated. I end up with 'overdue'
everytime.
ServiceAlert: IIf(([Current Engine Hours] Between [Service]*0.85 And
[Service]),IIf(([Current Engine
Hours]>[Service]),"Due","Overdue"),Null)
Thanks Again,
Mary-mumble,mumble,mumble
:
Hi, Mary.
Under your current logic, no special value will be displayed if the
engine
is overdue for maintenance. If you would like the value "Due" to be
displayed whether the engine is due or overdue, try the following
syntax
(watch out for word wrap):
ServiceAlert: IIF (([Current Engine Hours] >= Service * 0.85), "Due",
NULL)
If you would also like the value "Overdue" to be displayed when the
engine
is overdue for maintenance, try the following syntax (watch out for
word
wrap):
ServiceAlert: IIF (([Current Engine Hours] >= Service * 0.85),
IIF(([Current
Engine Hours] < Service), "Due", "Overdue"), NULL)
If you would like the value "Due" to be displayed when maintenance is
due,
but no value displayed when the engine is overdue for maintenance (as
is
in
your current logic), then try the following syntax (watch out for word
wrap):
ServiceAlert: IIF (([Current Engine Hours] >= Service * 0.85) AND
([Current
Engine Hours] < Service), "Due", NULL)
HTH.
Gunny
See
http://www.QBuilt.com for all your database needs.
See
http://www.Access.QBuilt.com for Microsoft Access tips.
(Please remove ZERO_SPAM from my reply E-mail address, so that a
message
will be forwarded to me.)
Beware to those who use munged addresses: known newsgroup E-mail
harvesters
for spammers are
[email protected] and
[email protected]
- - -
When you see correct answers to your question posted in Microsoft's
Online
Community, please sign in to the Community and mark these posts as
"Answers,"
so that all may benefit by filtering on "Answered questions" and
quickly
finding the right answers to similar questions. Remember that the
first
and
best answers are often given to those who have a history of rewarding
the
contributors who have taken the time to answer questions correctly.
:
I'd like the following statement to display "Due" is value is "-1".
-1 is natural result if statment is true. Currently I get "30ue" in
the
results field.
Any thoughts?
ServiceAlert: Format([Current Engine Hours]>=[Service]*0.85 And
[Current
Engine Hours]<[Service],"d""ue""")
Thanks so much
Mary