I get the error ADODB.Fields (0x800A0CC1)
Item cannot be found in the collection corresponding to the requested name or ordinal.
I know what is happening in that there is no data for the specified field.
Basically I have a crosstab in access displaying the results of a query, but I am unable to view this via my asp page as not all the fields have a value as yet.
I think I can over come this either one of two ways.
1. Get the cross tab to display 0 instead of displaying nothing when their is nothing to count
or
2. Somehow get the asp page to return a null or 0 value if nothing appears from the query.
The query in access is as follows.
Code:
TRANSFORM Count(statusreporthsc.SDC1) AS CountOfSDC1
SELECT statusreporthsc.date2, Count(statusreporthsc.SDC1) AS [Total Of SDC1]
FROM statusreporthsc
GROUP BY statusreporthsc.date2
PIVOT statusreporthsc.Category;
and the section of the asp page displaying the results is as follows
Code:
<tr>
<td align="left" width="14%"><%=(Recordset1.Fields.Item("date2").Value)%> </td>
<td align="left" width="14%"><%=(Recordset1.Fields.Item("HOD (SDC) Request").Value)%> </td>
<td align="left" width="14%"><%=(Recordset1.Fields.Item("Mini Consultancy").Value) %> </td>
<td align="left" width="14%"><%=(Recordset1.Fields.Item("Mini Project").Value)%> </td>
<td align="left" width="14%"><%=(Recordset1.Fields.Item("Site Project").Value)%> </td>
<td align="left" width="14%"><%=(Recordset1.Fields.Item("Total Of SDC1").Value)%> </td>
</tr>
<%
I really hope this makes sense to someone and you can help me.
Many thanks