Conditional formatting of field (1 Viewer)

clone4

New member
Local time
Today, 13:47
Joined
Feb 8, 2009
Messages
1
hi everybody,

so here is the issue. I've got one form with field that shows dates, what I need is to compare the date to the current date and if the month and year are same, make background red. I don't have experience with vbscript, I figured I would use some of the date functions, and regex I suppose, but didn't get grasp of wildcards etc yet.

It's quite urgent so any help will be really appreciated...
thanks
 

missinglinq

AWF VIP
Local time
Today, 16:47
Joined
Jun 20, 2003
Messages
6,423
Easiest way to do this is to use Conditional Formatting. In form Design View, select the date field (we'll call it YourDateField in thus example) and then goto

Format - Conditional Format

and from the lefthand dropdown box select

Expression Is

in the next box enter

Format([YourDateField],"mm/yy")=Format(Date(),"mm/yy")

substituting the actual name of your textbox for [YourDateField].

Now select the formatting you want and click OK.

Note, that when referring to a control in Conditional Formatting, you have to use the square brackets as above.
 

Users who are viewing this thread

Top Bottom