change text color

  • Thread starter Mary Ann Hailey
  • Start date
M

Mary Ann Hailey

I have a database results page that pulls a maintenance schedule from a query
in MS Access. The users would like to see the past due items highlighted. How
do I do this? Thank you!
 
S

Stefan B Rusynko

Use the Date Diff functionSee - http://www.devguru.com/technologies/vbscript/quickref/datediff.htmlIn the cell displaying your date
find the DBRW result code for thw date display from the DB- say it is: <%=fp_rs("yourdatefieldname")%> Replace it with:<% If
DateDiff("d",Date(),fp_rs("yourdatefieldname"))>30 then %> <font color"red"><%=fp_rs("yourdatefieldname")%></font><% Else %>
<font color"black"><%=fp_rs("yourdatefieldname")%></font><% End If %>
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


|I have a database results page that pulls a maintenance schedule from a query
| in MS Access. The users would like to see the past due items highlighted. How
| do I do this? Thank you!
 
S

Stefan B Rusynko

PS
Let me try that post w/ line breaks

Use the Date Diff function

See - http://www.devguru.com/technologies/vbscript/quickref/datediff.html

In the cell displaying your date find the DBRW result code for the date display from the DB

- say it is: <%=fp_rs("yourdatefieldname")%>

Replace it with:

<% If DateDiff("d",Date(),fp_rs("yourdatefieldname"))>30 then %>

<font color"red"><%=fp_rs("yourdatefieldname")%></font>

<% Else %>

<font color"black"><%=fp_rs("yourdatefieldname")%></font>

<% End If %>

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Use the Date Diff functionSee - http://www.devguru.com/technologies/vbscript/quickref/datediff.htmlIn the cell displaying your
date
| find the DBRW result code for thw date display from the DB- say it is: <%=fp_rs("yourdatefieldname")%> Replace it with:<% If
| DateDiff("d",Date(),fp_rs("yourdatefieldname"))>30 then %> <font color"red"><%=fp_rs("yourdatefieldname")%></font><% Else %>
| <font color"black"><%=fp_rs("yourdatefieldname")%></font><% End If %>
| --
|
| _____________________________________________
| SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| "Warning - Using the F1 Key will not break anything!" (-;
| _____________________________________________
|
|
| ||I have a database results page that pulls a maintenance schedule from a query
|| in MS Access. The users would like to see the past due items highlighted. How
|| do I do this? Thank you!
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top