Prev: nothing
Next: Do Long Names Corrupt?
From: Bazmac on 21 Apr 2010 20:27 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
From: fredg on 21 Apr 2010 22:01 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
From: Bazmac on 25 Apr 2010 19:40 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 > . >
|
Pages: 1 Prev: nothing Next: Do Long Names Corrupt? |