JackSkellington
Technical User
Hi I need to add some columns to the table, I thought this would be as simple as adding another:
<td class="head"<%= strCellHead %>>Unauthorised</td>
with the apporpriate:
<td><%= rsSundries("Number").Value %> </td>
But this does not seem to work as it fills the column with a check box. Also the date and No. of Receipts fields don't seem to be populating.
Any help most appreciated
Jack
<td class="head"<%= strCellHead %>>Unauthorised</td>
with the apporpriate:
<td><%= rsSundries("Number").Value %> </td>
But this does not seem to work as it fills the column with a check box. Also the date and No. of Receipts fields don't seem to be populating.
Any help most appreciated
Jack
Code:
<!-- Heading of the Sundry table -->
<table cellpadding="4" cellspacing="0" id="sundries"<%= strTable %>>
<tr>
<td class="head"<%= strCellHead %>>Date</td>
<td class="head"<%= strCellHead %>>Sundry Item</td>
<td class="head"<%= strCellHead %>>No. of Receipts</td>
<td class="head"<%= strCellHead %>>Amount</td>
<td class="head"<%= strCellHead %>>Authorised</td>
<td class="head"<%= strCellHead %>>Unauthorised</td>
</tr>
<%
Dim rsSundries
sQuery = "up_retrieveSundriesAuth " & Request("EmployeeNo") & ",'" & sMonth & "01', '" & sNextMonth & "01'"
Set rsSundries = OpenRecordset(sQuery)
While Not rsSundries.EOF
sID = rsSundries("ID").Value
If IsNull(rsSundries("AuthorisedBy").Value) Then 'Unauthorised
sStatus = "<td><input type=""Radio"" name=""sundry" & sID & """ value=""1"" onClick=""changed = true""></td><td><input type=""Radio"" name=""sundry" & sID & """ value=""0"" onClick=""changed = true"" checked><input type=""hidden"" name=""sundry" & sID & """ value=""U""></td>"
Else 'Manager Authorised
If IsNull(rsSundries("PayrollAuthBy").Value) Then 'Payroll Authorised
sStatus = "<td><input type=""Radio"" name=""sundry" & sID & """ value=""1"" onClick=""changed = true"" checked></td><td><input type=""Radio"" name=""sundry" & sID & """ value=""0"" onClick=""changed = true""><input type=""hidden"" name=""sundry" & sID & """ value=""A""></td>"
Else 'Payroll Unauthorised
sStatus = "<td colspan=""2"">Payroll Authorised</td>"
End If
End If
%>
<tr>
<td><%= FormatDateTime(rsSundries("Date").Value, vbShortDate) %> </td>
<td><%= rsSundries("Description").Value %> </td>
<td><%= rsSundries("Number").Value %> </td>
<td><%= FormatNumber(rsSundries("Amount").Value, 2) %> </td>
<%= sStatus %>
</tr>
<%
'Don't forget to advance on to the next record at the end of the loop
rsSundries.MoveNext
Wend
'Tidy up...
rsSundries.Close
Set rsSundries = Nothing
%>