If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Conditional Formatting a Date
Hi All,
I have a contiuous form with a date field "AppointmentDate" with back style set to Transperant, which is over an unbound text box "AppointmentColour". I would like to have "AppointmentColour" change to amber when "AppointmentDate" = minus 1 day and change to red when "AppointmentDate" = today Example: When "AppointmentDate" is 22-04-2010 "AppointmentColour" becomes amber on 21-04-2010 "AppointmentColour" becomes red on 22-04-2010 I have tried using Expression Is [AppointmentDate]=DateAdd("d",-1,Date) and many other variations but no success. Could someone please correct my error. Thanking you in Advance Bazmac |
#2
|
|||
|
|||
Conditional Formatting a Date
On Wed, 21 Apr 2010 17:27:01 -0700, Bazmac wrote:
Hi All, I have a contiuous form with a date field "AppointmentDate" with back style set to Transperant, which is over an unbound text box "AppointmentColour". I would like to have "AppointmentColour" change to amber when "AppointmentDate" = minus 1 day and change to red when "AppointmentDate" = today Example: When "AppointmentDate" is 22-04-2010 "AppointmentColour" becomes amber on 21-04-2010 "AppointmentColour" becomes red on 22-04-2010 I have tried using Expression Is [AppointmentDate]=DateAdd("d",-1,Date) and many other variations but no success. Could someone please correct my error. Thanking you in Advance Bazmac In Access you must include the () when using the Date() function. [AppointmentDate]=DateAdd("d",-1,Date()) and the expression needs to go in the AppointmentColor Conditional Formatting. The () is not necessary in VBA. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#3
|
|||
|
|||
Conditional Formatting a Date
Fred,
Thankyou for the reply I have tried your suggestion, but still cannot get it to work. I have BackStyle = Normal BackColour = Automatic Any other thoughts. Bazmac "fredg" wrote: On Wed, 21 Apr 2010 17:27:01 -0700, Bazmac wrote: Hi All, I have a contiuous form with a date field "AppointmentDate" with back style set to Transperant, which is over an unbound text box "AppointmentColour". I would like to have "AppointmentColour" change to amber when "AppointmentDate" = minus 1 day and change to red when "AppointmentDate" = today Example: When "AppointmentDate" is 22-04-2010 "AppointmentColour" becomes amber on 21-04-2010 "AppointmentColour" becomes red on 22-04-2010 I have tried using Expression Is [AppointmentDate]=DateAdd("d",-1,Date) and many other variations but no success. Could someone please correct my error. Thanking you in Advance Bazmac In Access you must include the () when using the Date() function. [AppointmentDate]=DateAdd("d",-1,Date()) and the expression needs to go in the AppointmentColor Conditional Formatting. The () is not necessary in VBA. -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail . |
Thread Tools | |
Display Modes | |
|
|