date not displaying correct message

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hello all,

I have a text box that I would like to display a message
based on if the "ClassDate" is one week(7) days from
today's (current) date. If the "ClassDate" is less than 7
days away from today's date I would like the
message "Class starts within 1 week" to display.
Otherwise, "Upcoming Class" displays. I've been working
with the following code below, but it is not displaying
the correct message.


=IIf(DateDiff("d",[ClassDate],Now())<=7,"Class starts
within 1 week","Upcoming Class")

How can I go about accomplishing this? Thanks a bunch!!!!
 
Hey there, I believe the following does the trick:

=IIf([ClassDate]<=Now()+7,"Class starts within 1
week","Upcoming Class")

Thanks for taking a look at this for me. Have a good one!
 
Back
Top