Tommorrow's Date Highligted

  • Thread starter Thread starter Bob Vance
  • Start date Start date
B

Bob Vance

Trying to Conditional Format a text box to highlight tommorrows Date!

[tbAlertDate]=Now()+1
 
Bob,

Now() returns date and time. If you only need the date use the Date()
function.

Steve
(e-mail address removed)
 
Trying to Conditional Format a text box to highlight tommorrows Date!

[tbAlertDate]=Now()+1

Now() does not return today's date. It returns the current time, accurate to
microseconds; unless tbAlertDate contained #02/20/2010 03:09:03PM#... oops the
time changed it doesn't match any more...!

Use Date() instead of Now().
 
Thanks by using Now() I will get the warning on todays date if the date is
Feb21 and the day is feb21
[tbAlertDate]=Date()+1 am tring to get tommorrows date to condition but this
is not working!
Also when I go to my form with the conditional Formatting the conditions
dont work but if I close the form go back to Main page then go back to my
form the conditions work! ..Regards Bob

John W. Vinson said:
Trying to Conditional Format a text box to highlight tommorrows Date!

[tbAlertDate]=Now()+1

Now() does not return today's date. It returns the current time, accurate
to
microseconds; unless tbAlertDate contained #02/20/2010 03:09:03PM#... oops
the
time changed it doesn't match any more...!

Use Date() instead of Now().
 
Oops fix the Conditional Format by requering my subform :)
but still cant get tommorrows date to work..Thanks Bob

Bob Vance said:
Thanks by using Now() I will get the warning on todays date if the date is
Feb21 and the day is feb21
[tbAlertDate]=Date()+1 am tring to get tommorrows date to condition but
this is not working!
Also when I go to my form with the conditional Formatting the conditions
dont work but if I close the form go back to Main page then go back to my
form the conditions work! ..Regards Bob

John W. Vinson said:
Trying to Conditional Format a text box to highlight tommorrows Date!

[tbAlertDate]=Now()+1

Now() does not return today's date. It returns the current time, accurate
to
microseconds; unless tbAlertDate contained #02/20/2010 03:09:03PM#...
oops the
time changed it doesn't match any more...!

Use Date() instead of Now().
 
Now() returns the current date and time according to the system clock. The
date portion returns today's date but the time portion continually changes
as the current time changes.

Steve


John W. Vinson said:
Trying to Conditional Format a text box to highlight tommorrows Date!

[tbAlertDate]=Now()+1

Now() does not return today's date. It returns the current time, accurate
to
microseconds; unless tbAlertDate contained #02/20/2010 03:09:03PM#... oops
the
time changed it doesn't match any more...!

Use Date() instead of Now().
 
When you say [tbAlertDate]=Date()+1 is not working, what do you mean? Where
and when are you executing this expression? Date() + 1 returns a number. Is
[tbAlertDate] formatted as a number?

Steve

Bob Vance said:
Oops fix the Conditional Format by requering my subform :)
but still cant get tommorrows date to work..Thanks Bob

Bob Vance said:
Thanks by using Now() I will get the warning on todays date if the date
is Feb21 and the day is feb21
[tbAlertDate]=Date()+1 am tring to get tommorrows date to condition but
this is not working!
Also when I go to my form with the conditional Formatting the conditions
dont work but if I close the form go back to Main page then go back to my
form the conditions work! ..Regards Bob

John W. Vinson said:
Trying to Conditional Format a text box to highlight tommorrows Date!

[tbAlertDate]=Now()+1

Now() does not return today's date. It returns the current time,
accurate to
microseconds; unless tbAlertDate contained #02/20/2010 03:09:03PM#...
oops the
time changed it doesn't match any more...!

Use Date() instead of Now().
 
Thanks Steve, tbAlertDate is a text box on my continous form that has a
Date/Time field, I am trying to get tomorrows date background green, through
Conditional format,,,,,,,,,Thanks Bob

Steve said:
When you say [tbAlertDate]=Date()+1 is not working, what do you mean?
Where and when are you executing this expression? Date() + 1 returns a
number. Is [tbAlertDate] formatted as a number?

Steve

Bob Vance said:
Oops fix the Conditional Format by requering my subform :)
but still cant get tommorrows date to work..Thanks Bob

Bob Vance said:
Thanks by using Now() I will get the warning on todays date if the date
is Feb21 and the day is feb21
[tbAlertDate]=Date()+1 am tring to get tommorrows date to condition but
this is not working!
Also when I go to my form with the conditional Formatting the conditions
dont work but if I close the form go back to Main page then go back to
my form the conditions work! ..Regards Bob

Trying to Conditional Format a text box to highlight tommorrows Date!

[tbAlertDate]=Now()+1

Now() does not return today's date. It returns the current time,
accurate to
microseconds; unless tbAlertDate contained #02/20/2010 03:09:03PM#...
oops the
time changed it doesn't match any more...!

Use Date() instead of Now().
 
Why are you restating what John Posted?

Are you trying to gain some credibility after another round of spamming the
newsgroups witn another feable attempt to pimp your services?

John... Visio MVP
Steve said:
Now() returns the current date and time according to the system clock. The
date portion returns today's date but the time portion continually changes
as the current time changes.

Steve


John W. Vinson said:
Trying to Conditional Format a text box to highlight tommorrows Date!

[tbAlertDate]=Now()+1

Now() does not return today's date. It returns the current time, accurate
to
microseconds; unless tbAlertDate contained #02/20/2010 03:09:03PM#...
oops the
time changed it doesn't match any more...!

Use Date() instead of Now().
 
Bob,

Date()+1 returms tomorrow's date. If you put the expression =Date()+1 in the
control source of an unbound textbox, you will see tomorrow's date in the
textbox. Please answer ALL the questions in my previous post so I can try to
help you.

Steve


Bob Vance said:
Thanks Steve, tbAlertDate is a text box on my continous form that has a
Date/Time field, I am trying to get tomorrows date background green,
through Conditional format,,,,,,,,,Thanks Bob

Steve said:
When you say [tbAlertDate]=Date()+1 is not working, what do you mean?
Where and when are you executing this expression? Date() + 1 returns a
number. Is [tbAlertDate] formatted as a number?

Steve

Bob Vance said:
Oops fix the Conditional Format by requering my subform :)
but still cant get tommorrows date to work..Thanks Bob

Thanks by using Now() I will get the warning on todays date if the date
is Feb21 and the day is feb21
[tbAlertDate]=Date()+1 am tring to get tommorrows date to condition but
this is not working!
Also when I go to my form with the conditional Formatting the
conditions dont work but if I close the form go back to Main page then
go back to my form the conditions work! ..Regards Bob

Trying to Conditional Format a text box to highlight tommorrows Date!

[tbAlertDate]=Now()+1

Now() does not return today's date. It returns the current time,
accurate to
microseconds; unless tbAlertDate contained #02/20/2010 03:09:03PM#...
oops the
time changed it doesn't match any more...!

Use Date() instead of Now().
 
Thanks Ken worked brilliant :) and thanks Steve...Regards Bob

KenSheridan via AccessMonster.com said:
Bob:

This should do it:

Expression is DateValue([tbAlertDate])=DateAdd("d",1,Date())

This will cater for tbAlertDate containing a date with or without a
non-zero
time of day element. Unless you've taken specific steps in the table
definition to prevent it, i.e. by means of a ValidationRule, its all to
easy
for non-zero times of day to creep into date/time values without you being
aware of it; the inappropriate use of the Now() function is the most
common
culprit.

Ken Sheridan
Stafford, England

Bob said:
Thanks Steve, tbAlertDate is a text box on my continous form that has a
Date/Time field, I am trying to get tomorrows date background green,
through
Conditional format,,,,,,,,,Thanks Bob
When you say [tbAlertDate]=Date()+1 is not working, what do you mean?
Where and when are you executing this expression? Date() + 1 returns a
[quoted text clipped - 24 lines]
Use Date() instead of Now().
 
Back
Top