Programming date

K

Kely

How can I make Microsoft Access give me a sign that the date that I put in a
given field of a record, is equal to date of the computer ( in the future not
in the moment that i put ).

thanks =D
 
S

strive4peace

Hi Kely,

when you say "give you a sign" ...

~~~~~~~~
if you mean apply some special formatting (like make the date foreground
or background color red):

you can use Conditional Formatting to do this:

in the design view of the form (you can do it in Form view but I feel it
is best to make design changes in design view):

click on the control

from the menu, choose Format, Conditional Formatting

Field Value Is --> equal to --> Date()
--> set Foreground Color, background color, Bold, Italic, Underline,
and/or enabled

~~~~~~~~~~

if you mean that you want to create a calculated indicator field in a
query, for instance, you can do this:

field --> IsItToday: IIF( [Date_fieldname] = Date(), "*", "")

syntax:
IIF(condition, value-if-true, value-if-false)

~~~

if you are also storing a time component in the date, you will need to
wrap the reference in DateValue to just get the date part

DateValue([Date_fieldname])

and you will have to modify conditional formatting to:
Expression Is --> DateValue([Date_fieldname]) = Date()
OR
DateValue([Date_controlname]) = Date()


Warm Regards,
Crystal

Access Basics
8-part free tutorial that covers essentials in Access
http://www.accessmvp.com/Strive4Peace/Index.htm

*
:) have an awesome day :)
*
 
Top