Then your form field Entry_Date is not a valid date
Test your results
Add a debug line at the end
Response.write "Entry_Date = " & Entry_Date & " and data type is " & TypeName(Entry_Date)
--
_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________
| Stefan,
|
| Thanks for sticking with me on this. I'm still getting the same results. All
| of the cells are the same color.
|
| Jeff
|
| "Stefan B Rusynko" wrote:
|
| > Sorry, My error
| > Redo as
| > <%
| > EntryDate = date()
| > If IsDate(request.querystring("Entry_Date")) Then
| > Entry_date = Cdate(request.querystring("Entry_Date"))
| > If EntryDate = Entry_date Then cellcolor= "bgcolor='gray'"
| > Else
| > cellcolor= "bgcolor='FFCC77'"
| > End if
| > %>
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > _____________________________________________
| >
| >
| > | Here is what my code looks like now per your suggestion. (I hope this is what
| > | you meant)
| > |
| > | <%
| > | if IsDate request.querystring("Entry_Date") then
| > | Cdate(request.querystring("Entry_Date"))
| > | EntryDate = date()
| > | if EntryDate = (request.querystring("Entry_Date")) then
| > | cellcolor= "bgcolor='gray'"
| > | else
| > | cellcolor= "bgcolor='FFCC77'"
| > | end if
| > | %>
| > |
| > | <td <%=cellcolor%>>
| > |
| > | Now I get this error when I view my asp page:
| > |
| > | Microsoft VBScript compilation error '800a03f9'
| > |
| > | Expected 'Then'
| > |
| > | /allsigninstestbgcolor.asp, line 152
| > |
| > | if IsDate request.querystring("Entry_Date") then
| > | Cdate(request.querystring("Entry_Date"))
| > | ----------^
| > |
| > |
| > | Jeff
| > |
| > |
| > |
| > | "Stefan B Rusynko" wrote:
| > |
| > | > Make sure (request.querystring("Entry_Date")) is a valid date format
| > | >
| > | > Add before
| > | > EntryDate = date()
| > | >
| > | > if IsDate request.querystring("Entry_Date") then Cdate(request.querystring("Entry_Date"))
| > | > --
| > | >
| > | > _____________________________________________
| > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > To find the best Newsgroup for FrontPage support see:
| > | >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > _____________________________________________
| > | >
| > | >
| > | > | Thanks for the response, but no luck. I'm still getting the same results. All
| > | > | of the cells still come up the same color.
| > | > |
| > | > | Jeff
| > | > |
| > | > |
| > | > | "Stefan B Rusynko" wrote:
| > | > |
| > | > | > Try
| > | > | > <%
| > | > | > EntryDate = date()
| > | > | > if EntryDate = (request.querystring("Entry_Date")) then
| > | > | > cellcolor= "bgcolor='gray'"
| > | > | > else
| > | > | > cellcolor= "bgcolor='FFCC77'"
| > | > | > end if
| > | > | > %>
| > | > | >
| > | > | > Then in your table set the cell as
| > | > | > <td <%=cellcolor%>>
| > | > | >
| > | > | > --
| > | > | >
| > | > | > _____________________________________________
| > | > | > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > | > | > "Warning - Using the F1 Key will not break anything!" (-;
| > | > | > To find the best Newsgroup for FrontPage support see:
| > | > | >
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
| > | > | > _____________________________________________
| > | > | >
| > | > | >
| > | > | > | Does anyone know how to change the background color in the database results
| > | > | > | table based on the results in a field?
| > | > | > |
| > | > | > | I have a column (on an ASP Intranet Page) that displays the date for each
| > | > | > | item entered into the database.
| > | > | > |
| > | > | > | I would like to change the background color of this column for every day
| > | > | > | except for the current day(today). This is to distinguish todays activity
| > | > | > | from all other days.
| > | > | > |
| > | > | > | I came up with the following code but it's not working correctly. The result
| > | > | > | I get now is the background color is the FFCC77color for all days, including
| > | > | > | today. The gray color will not come up for todays entries.
| > | > | > |
| > | > | > |
| > | > | > | <%
| > | > | > | EntryDate = date()
| > | > | > | if EntryDate = (request.querystring("Entry_Date")) then
| > | > | > | bgcolor="gray"
| > | > | > | else
| > | > | > | bgcolor="FFCC77"
| > | > | > | end if %>
| > | > | > |
| > | > | > |
| > | > | > | Any ideas?
| > | > | > |
| > | > | > | Thanks,
| > | > | > |
| > | > | > | Jeff
| > | > | >
| > | > | >
| > | > | >
| > | >
| > | >
| > | >
| >
| >
| >