Values not being sent
I am having a problem with a form not posting the values from my dropdowns to the confirmation page. There are many dropdowns on the page, but to keep the code as small as possible I will post a small portion that gives an example of how I am doing it.
The larger problem is that the form is suppose to pass the values in the form to the confirmation page (and thus to the DB). Everything goes through without error messages, but the UCode values do not show up in the DB - everything else does. That's why I decided to check to see if their values were getting to the confirmation page. The response.write says there is no value present.
I did the following Response.Write to check for the value on confirmation page:
<%
Response.Write "The value in UCodes1 is: " & request.form("UCodes1")
Response.End
%>
No value is returned, only the text. On the form some of the values are passed to the db from the confirmation page, just not any of the UCode values.
<form ACTION="TAUCALCP.asp?Yr=<%=varYrA%>" METHOD="POST">
<input type="hidden" name="MonMonth" value="<%=Request("Month")%>"><input type="hidden"
name="YrYear" value="<%=varYear%>"><hr>
<hr>
<p><font size="6">Trainer Attendance and Utilization Input Page</font></p>
<hr>
<hr>
<%
varMonth = Request.Form("Month")
varYear = varYrA
If (varMonth=" ") Then
Response.Write "<H2>ERRORS PLEASE CORRECT</H2>"
Response.Write "Please Enter: <H2>'MONTH'</H2> <BR><BR>"
Response.Write "Use your Back Button to correct field or: <BR><BR>"
Response.Write "<A HREF='TAUCAL.asp'>Click Here to Clear and Correct all fields</A>"
Response.End
End If
varYear = Right(varYear,2)
varMonYr = (varMonth & "/" & varYear)
'Pull data from DBase table for building tables on Form
'
SQLCal = " SELECT ZZCalendar.MonYr, ZZCalendar.DateSt, ZZCalendar.DaySt, "
SQLCal = SQLCal & " ZZCalendar.MonSt, ZZCalendar.PosSt, ZZCalendar.DateEnd, "
SQLCal = SQLCal & " ZZCalendar.DayEnd, ZZCalendar.PosEnd, ZZCalendar.DInM, "
SQLCal = SQLCal & " ZZCalendar.DInMDSt, ZZCalendar.WksInM, ZZCalendar.[445] "
SQLCal = SQLCal & " FROM ZZCalendar "
SQLCal = SQLCal & " WHERE ZZCalendar.MonYr LIKE '%"& varMonYr &"%'"' "
'
SQLCal = SQLCal & " ORDER BY ZZCalendar.DateSt ASC "
Set rsCal=Conn.Execute(SQLCal)
varDateSt = rsCal("DateSt")
varDaySt = rsCal("DaySt")
varMonSt = rsCal("MonSt")
varPosSt = rsCal("PosSt")
varDateEnd = rsCal("DateEnd")
varDayEnd = rsCal("DayEnd")
varPosEnd = rsCal("PosEnd")
varDInM = rsCal("DInM")
varDInMDSt = rsCal("DInMDSt")
varWksInM = rsCal("WksInM")
var445 = rsCal("445")
rsCal.Close
Set rsCal=nothing
'Header for Page Month and Year
'
varMonMonth = Month(varMonSt)
varYrYear = Year(varMonSt)
varMonthH = MonthName(varMonth)
varMonthDS = MonthName(Month(varDateSt))
varYearH = Year(varMonSt)
Response.Write ("<H3>For Month/Year: " & varMonthH & ", " & varYearH & "</H3>")
%>
<table cellSpacing="0" cellPadding="0" width="10%" align="left" border="1">
<tr>
<td noWrap bgcolor="#008080"><div align="center"><center><p><font
style="BACKGROUND-COLOR: #008080" color="white">Trainer Name</font></td>
</tr>
<tr align="center">
<td noWrap bgcolor="#808080" align="Center"><select NAME="TName" SIZE="1" id="TName"
tabindex="1">
<option Selected value=" "> </option>
<% Set rsTNPD=Conn.Execute(" SELECT DISTINCT Trainers.TName FROM Trainers ORDER BY TName ASC ")
MArTNPD = rsTNPD.GetRows()
rsTNPD.Close
Set rsTNPD=Nothing
For x = 0 to Ubound(MArTNPD,2)
%> <option VALUE="<%Response.Write MArTNPD(0,x)%>"><%Response.Write MArTNPD(0,x)%></option>
<% Next %> </select> </td>
</tr>
</table>
<div align="center"><center><p><br>
<br>
<br>
<br>
</p>
</center></div><div align="center"><center><h3>Attendance & Utilization Form</h3>
</center></div><div align="center"><center><table cellSpacing="1" cellPadding="1"
width="90%" align="center" border="1">
<tr>
<th noWrap bgcolor="#008080"><font Color="White">Sunday</font></th>
<th noWrap bgcolor="#008080"><font Color="White">Monday</font></th>
<th noWrap bgcolor="#008080"><font Color="White">Tuesday</font></th>
<th noWrap bgcolor="#008080"><font Color="White">Wednesday</font></th>
<th noWrap bgcolor="#008080"><font Color="White">Thursday</font></th>
<th noWrap bgcolor="#008080"><font Color="White">Friday</font></th>
<th noWrap bgcolor="#008080"><font Color="White">Saturday</font></th>
<th height="5"></th>
<%
tab = 2
%>
</tr>
<tr>
<th noWrap bgcolor="#008080"><font Color="White"><%
Select Case varMonth
Case 1
Response.Write " "
Case 2
Response.Write "February 1"
Case 3
Response.Write " "
Case 4
Response.Write " "
Case 5
Response.Write " "
Case 6
Response.Write " "
Case 7
Response.Write " "
Case 8
Response.Write "August 1"
Case 9
Response.Write " "
Case 10
Response.Write " "
Case 11
Response.Write " "
Case 12
Response.Write " "
End Select%></font></th>
</tr>
<tr>
<td noWrap bgcolor="#808080" align="center"><select NAME="UCodes1" SIZE="1" id="UCodes1"
tab index="1">
<option Selected value=" "> </option>
<%
Set rsUCAbPD=Conn.Execute(" SELECT DISTINCT ZZAttdCode.AttdCodeAb FROM ZZAttdCode ORDER BY AttdCodeAb ASC ")
MArUCAbPD = rsUCAbPD.GetRows()
rsUCAbPD.Close
Set rsUCAbPD=Nothing
For x = 0 to Ubound(MArUCAbPD,2)
%> <option VALUE="<%Response.Write MArUCAbPD(0,x)%>"><%Response.Write MArUCAbPD(0,x)%></option>
<%
Next
%> </select> </td>
</tr>
<tr>
<td align="left" bgcolor="#C0C0C0" colspan="2">Submit Data: <input id="submit1"
type="submit" value="Submit" name="submit1"> </td>
</tr>
<tr>
<td align="left" bgcolor="#C0C0C0" colspan="2">Reset Form: <input id="reset1"
type="reset" value="Reset" name="reset1"> </td>
</tr>
</table>
</center></div><div align="center"><center><table cellSpacing="1" cellPadding="1"
width="90%" align="center" border="1">
<tr>
<td><b><u>AD</u></b>-Adopt a Child<b><u>CB</u></b>-Out of the Unit on Company Business <b><u>CBT</u></b>-Out
of the Unit on Company Business,Trained Full Day <b><u>CBT.5</u></b>-Out of the Unit on
Company Business,Trained 1/2 Day <b><u>CBX.5</u></b>-Out of the Unit on Company
Business,Worked 1/2 Day <b><u>D</u></b>-Designated Day Off<b><u>F</u></b>-Funeral <b><u>FMLA</u></b>-Family
Medical Leave Act <b><u>H</u></b>-Legal Holiday <b><u>IG</u></b>-Paid Illness<b><u>IGT.5</u></b>-Trained
1/2 Day,Illness 1/2Day <b><u>IGX.5</u></b>-Worked 1/2 Day, Illness 1/2 Day, No Training <b><u>IW</u></b>-Inclement
Weather<b><u>J</u></b>-Jury Duty <b><u>NA</u></b>-Used Prior to Start Date or after Last
Day in Training to Complete Month <b><u>NCNS</u></b>-No Call, No Show <b><u>PH</u></b>-Personal
Holiday<b><u>STD</u></b>-ShortTerm Disability <b><u>Susp</u></b>-Suspended <b><u>T</u></b>-Trained
Full Day, Worked Full Day <b><u>T.5</u></b>-Trained 1/2 Day, Worked Full Day<b><u>UL</u></b>-Unpaid
LOA <b><u>V</u></b>-Vacation<b><u>V.5</u></b>-1/2 Day Vacation, No Training, No Work <b><u>VT.5</u></b>-1/2
Day Vacation,1/2 Day Training<b><u>WC</u></b>-Workers Comp <b><u>X</u></b>-Full Day
Worked, No Training<b><u>X.5</u></b>-Worked 1/2Day, No Training <b><u>XT.5</u></b>-Worked
1/2 Day,Trained 1/2 Day<b><u>XV.5</u></b>-1/2Day Vacation ,Worked 1/2Day, No Training </td>
</tr>
</table>
</center></div><div align="center"><center><p><br>
<br>
</p>
</center></div>
</form>
</body>
<%
Conn.Close
Set Conn=Nothing
%>