Conditional Format in a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using conditional formating in a form and I want it to highlight dates
that are less than the current year. ie anything later than January of the
current year. I dont want to manually enter the year. Any Ideas? I tried
<DateSerial(Year(Date()),-1 but I got an aurgument pop-up

Thank you in advance
 
Larry,
You are on the right path, but here is what you need.
In the conditional formatting dialog box:
Select "Expression is"
In the text box for the expression:
[forms]![frmMyFormName]![txtMyTextBoxName] < Dateserial(Year(date()),1,1)
Then set the colors you need.
Interestingly, I tried using Me.txtMyTextBoxName and it did not work. It
seems to want the fully qualified name of the control.
 
Take the -1 out of the function call, that will return 1/1/2004, what he
wants is current year
 
Thank you all works great
Sorry for the late reply just got back from vacation

Klatuu said:
Larry,
You are on the right path, but here is what you need.
In the conditional formatting dialog box:
Select "Expression is"
In the text box for the expression:
[forms]![frmMyFormName]![txtMyTextBoxName] < Dateserial(Year(date()),1,1)
Then set the colors you need.
Interestingly, I tried using Me.txtMyTextBoxName and it did not work. It
seems to want the fully qualified name of the control.

LT Larry said:
I am using conditional formating in a form and I want it to highlight dates
that are less than the current year. ie anything later than January of the
current year. I dont want to manually enter the year. Any Ideas? I tried
<DateSerial(Year(Date()),-1 but I got an aurgument pop-up

Thank you in advance
 
Glad it worked out. But, let me get this straight. You give your problem to
us to solve and then go on vacation? Hardly seems fair :)

LT Larry said:
Thank you all works great
Sorry for the late reply just got back from vacation

Klatuu said:
Larry,
You are on the right path, but here is what you need.
In the conditional formatting dialog box:
Select "Expression is"
In the text box for the expression:
[forms]![frmMyFormName]![txtMyTextBoxName] < Dateserial(Year(date()),1,1)
Then set the colors you need.
Interestingly, I tried using Me.txtMyTextBoxName and it did not work. It
seems to want the fully qualified name of the control.

LT Larry said:
I am using conditional formating in a form and I want it to highlight dates
that are less than the current year. ie anything later than January of the
current year. I dont want to manually enter the year. Any Ideas? I tried
<DateSerial(Year(Date()),-1 but I got an aurgument pop-up

Thank you in advance
 
I tried to reply from home but the system would not let me for some reason so
I did not want to leave anyone hanging or thinking that I am not grateful for
the help :-)

Now that, that problem is sovled I am on to bigger issues :-(
So back to reading my Acess Inside/Out Book

Thanks again

Klatuu said:
Glad it worked out. But, let me get this straight. You give your problem to
us to solve and then go on vacation? Hardly seems fair :)

LT Larry said:
Thank you all works great
Sorry for the late reply just got back from vacation

Klatuu said:
Larry,
You are on the right path, but here is what you need.
In the conditional formatting dialog box:
Select "Expression is"
In the text box for the expression:
[forms]![frmMyFormName]![txtMyTextBoxName] < Dateserial(Year(date()),1,1)
Then set the colors you need.
Interestingly, I tried using Me.txtMyTextBoxName and it did not work. It
seems to want the fully qualified name of the control.

:

I am using conditional formating in a form and I want it to highlight dates
that are less than the current year. ie anything later than January of the
current year. I dont want to manually enter the year. Any Ideas? I tried
<DateSerial(Year(Date()),-1 but I got an aurgument pop-up

Thank you in advance
 
Back
Top