polaatx
asked on
Updating Access database from Radio Buttons value
Hi, I have the following radio buttons in an update page:
<input name="publicTransportation " type="radio" value="1">
Yes
<input name="publicTransportation " type="radio" value="0">
No</p>
They update an Access database yes/no field. I thought value of 1 means true. and 0 means false.
But regardless of what value the user chooses, the database always shows True (the checkbox in Access is always checked).
Any ideas on what I'm doing wrong? I am building it in DW. In the DW's Update dialog, I chose Checbox MS Access as data type. That didn't work. I chose Checkbox 1,0. as data type and that didn't work either.
<input name="publicTransportation
Yes
<input name="publicTransportation
No</p>
They update an Access database yes/no field. I thought value of 1 means true. and 0 means false.
But regardless of what value the user chooses, the database always shows True (the checkbox in Access is always checked).
Any ideas on what I'm doing wrong? I am building it in DW. In the DW's Update dialog, I chose Checbox MS Access as data type. That didn't work. I chose Checkbox 1,0. as data type and that didn't work either.
you should put :
<input name="publicTransportation " type="radio" value="Y">
Yes
<input name="publicTransportation " type="radio" value="N">
No
instead.
Cristy
<input name="publicTransportation
Yes
<input name="publicTransportation
No
instead.
Cristy
The yes/no datatype accepts "Y" or "N", but not numeric data such as "0" or "1"
Cristy
Cristy
but when u select those Y/N field, u should made sqlstr as :
"select * from tablename where field = true"
Cristy
"select * from tablename where field = true"
Cristy
sorry, I made some mistake, The correct version should be :
<input name="publicTransportation " type="radio" value=true>
Yes
<input name="publicTransportation " type="radio" value=false>
No
instead.
Cristy
<input name="publicTransportation
Yes
<input name="publicTransportation
No
instead.
Cristy
ASKER
Cristy, thanks for your response.
Neither true/false or the Y/N solutions solved the problem. I am still getting True values in Access eventhough I am always checking no in the form.
Could it depend on the way ASP is inserting the data? Like the data type?
Neither true/false or the Y/N solutions solved the problem. I am still getting True values in Access eventhough I am always checking no in the form.
Could it depend on the way ASP is inserting the data? Like the data type?
Probably you have "true" as the default value for the checkbox.
Could you post your database insert / update part of your ASP code?
:) SD
Could you post your database insert / update part of your ASP code?
:) SD
is the datatype in your Access database a Y/N field ? I just tried that and it works fine.
If u are still having problem, u can try one of the following :
1. post your code here and let us see if anything else goes wrong
or
2, change your Y/N field to char field with 1 character space only
and you can still put "Y" or "N" or even "0" or "1",
But I guess option 1 is better so we can see what's actually cozing trouble,
Cristy
If u are still having problem, u can try one of the following :
1. post your code here and let us see if anything else goes wrong
or
2, change your Y/N field to char field with 1 character space only
and you can still put "Y" or "N" or even "0" or "1",
But I guess option 1 is better so we can see what's actually cozing trouble,
Cristy
maybe u can just test this statement inside your Access database to see if it works or not first :
INSERT INTO tablename ( field1, field2, field3 )
VALUES ("test", "234567", true);
where filed1, field2 are just char field and field3 is Y/N field
Cristy
INSERT INTO tablename ( field1, field2, field3 )
VALUES ("test", "234567", true);
where filed1, field2 are just char field and field3 is Y/N field
Cristy
ASKER
Hello experts. Here's my code. Sorry about all the DW superflous code. I am embarassed I have to use DW code but I'm an ASP illiterate.
<!--#include file="Connections/connSane 1.asp" -->
<%
if request.Form("submit") = "Continue Application" AND request.Form("Agreement_Ch eckbox") = "" then
Response.Redirect("apply_e rror.asp")
end if
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariabl es("SCRIPT _NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request. QueryStrin g)
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Update Record: set variables
If (CStr(Request("MM_update") ) = "form1" And CStr(Request("MM_recordId" )) <> "") Then
MM_editConnection = MM_connSane1_STRING
MM_editTable = "tblUsers"
MM_editColumn = "userID"
MM_recordId = "" + Request.Form("MM_recordId" ) + ""
MM_editRedirectUrl = "apply_reference.asp?userI D=" & request.Form("userID")
MM_fieldsStr = "Term_Applying_For|value|F irst_Name| value|Midd le_Name|va lue|Last_N ame|value| telephone| value|Stre et|value|C ity|value| Zip_Code|v alue|Insti tution_Cur rently_Enr olled|valu e|Class_At tending_Fa ll|value|C ollege_GPA |value|Hig hschool_GP A|value|co urse1|valu e|institut ion1|value |grade1|va lue|course 2|value|in stitution2 |value|gra de2|value| course3|va lue|instit ution3|val ue|grade3| value|cour se4|value| institutio n4|value|g rade4|valu e|course5| value|inst itution5|v alue|grade 5|value|co urse6|valu e|institut ion6|value |grade6|va lue|transp ortation|v alue|publi cTransport ation|valu e|Personal _Statement |value|not es1|value| Agreement_ Checkbox|v alue|ip_ad dress|valu e|dateEnte red|value| userLevelI D|value"
MM_columnsStr = "termappliedFor|none,none, NULL|fname |',none,'' |mname|',n one,''|lna me|',none, ''|telepho ne|',none, ''|street| ',none,''| city|',non e,''|state |',none,'' |instituti on|none,no ne,NULL|cl assStandin g|none,non e,NULL|col legeGPA|', none,''|hi ghschoolGP A|',none,' '|course1| ',none,''| institutio n1|',none, ''|grade1| ',none,''| course2|', none,''|in stitution2 |',none,'' |grade2|', none,''|co urse3|',no ne,''|inst itution3|' ,none,''|g rade3|',no ne,''|cour se4|',none ,''|instit ution4|',n one,''|gra de4|',none ,''|course 5|',none,' '|institut ion5|',non e,''|grade 5|',none,' '|course6| ',none,''| institutio n6|',none, ''|grade6| ',none,''| transporta tion|none, -1,0|publi cTransport ation|none ,-1,0|Pers onalStatem ent|',none ,''|notes1 |',none,'' |signature |none,1,0| ip_address |',none,'' |dateEnter ed|',none, NULL|userL evelID|non e,none,NUL L"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_field s(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Update Record: construct a sql update statement and execute it
If (CStr(Request("MM_update") ) <> "" And CStr(Request("MM_recordId" )) <> "") Then
' create the sql update statement
MM_editQuery = "update " & MM_editTable & " set "
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1)," ,")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","'' ") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_editQuery = MM_editQuery & ","
End If
MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal
Next
MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the update
Set MM_editCmd = Server.CreateObject("ADODB .Command")
MM_editCmd.ActiveConnectio n = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnectio n.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editR edirectUrl )
End If
End If
End If
%>
<%
Dim rsInstitutions
Dim rsInstitutions_numRows
Set rsInstitutions = Server.CreateObject("ADODB .Recordset ")
rsInstitutions.ActiveConne ction = MM_connSane1_STRING
rsInstitutions.Source = "SELECT * FROM tblInstitutions"
rsInstitutions.CursorType = 0
rsInstitutions.CursorLocat ion = 2
rsInstitutions.LockType = 1
rsInstitutions.Open()
rsInstitutions_numRows = 0
%>
<%
Dim rsClass
Dim rsClass_numRows
Set rsClass = Server.CreateObject("ADODB .Recordset ")
rsClass.ActiveConnection = MM_connSane1_STRING
rsClass.Source = "SELECT * FROM tblClass"
rsClass.CursorType = 0
rsClass.CursorLocation = 2
rsClass.LockType = 1
rsClass.Open()
rsClass_numRows = 0
%>
<%
Dim rsTerm
Dim rsTerm_numRows
Set rsTerm = Server.CreateObject("ADODB .Recordset ")
rsTerm.ActiveConnection = MM_connSane1_STRING
rsTerm.Source = "SELECT * FROM tblTerm ORDER BY term ASC"
rsTerm.CursorType = 0
rsTerm.CursorLocation = 2
rsTerm.LockType = 1
rsTerm.Open()
rsTerm_numRows = 0
%>
<%
Dim rsUsers__MMColParam
rsUsers__MMColParam = "1"
If (Request.QueryString("good email") <> "") Then
rsUsers__MMColParam = Request.QueryString("goode mail")
End If
%>
<%
Dim rsUsers
Dim rsUsers_numRows
Set rsUsers = Server.CreateObject("ADODB .Recordset ")
rsUsers.ActiveConnection = MM_connSane1_STRING
rsUsers.Source = "SELECT email, userID FROM tblUsers WHERE email = '" + Replace(rsUsers__MMColPara m, "'", "''") + "'"
rsUsers.CursorType = 0
rsUsers.CursorLocation = 2
rsUsers.LockType = 1
rsUsers.Open()
rsUsers_numRows = 0
%>
<form ACTION="<%=MM_editAction%> " METHOD="POST" name="form1" id="form1" onSubmit="MM_validateForm( 'Term_Appl ying_For', '','R','Fi rst_Name', '','R','La st_Name',' ','R', 'Institution_Currently_Enr olled','', 'R','Telep hone','',' R','Street ','','R',' City','',' R','State' ,'','R','Z ip_Code',' ','RisNum' ,'Class_At tending_Fa ll','','R' ,'College_ GPA','','R ','Highsch ool_GPA',' ','R','Per sonal_Stat ement','', 'R','Agree ment_Check box','','R ');return document.MM_returnValue">
<h3>Step 3: Personal & Academic Information </h3>
<h4>Term<span class="alert" style="font-size:11px">&nb sp;(requir ed)</span> <sup>*</su p></h4><br >
<table width="420"cellpadding="6" cellspacing="0"><tr><td align="right">Term you are applying for:<sup>*</sup></td><td>
<select name="Term_Applying_For" id="Term_Applying_For">
<option value="">Choose Term</option>
<%
While (NOT rsTerm.EOF)
%>
<option value="<%=(rsTerm.Fields.I tem("termI D").Value) %>"><%=(rs Term.Field s.Item("te rm").Value )%></optio n>
<%
rsTerm.MoveNext()
Wend
If (rsTerm.CursorType > 0) Then
rsTerm.MoveFirst
Else
rsTerm.Requery
End If
%>
</select>
</td></tr></table>
<h4>Personal Information</h4><br>
<table width="420" cellpadding="6" cellspacing="0"><tr>
<td align="right"> First Name:<sup>*</sup></td><td>
<input name="First_Name" type="text" id="First_Name" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'" size="25">
</td>
</tr>
<tr>
<td align="right"> Middle Name: </td><td align="left">
<input name="Middle_Name" type="text" id="Middle_Name" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'" size="25"/>
</td></tr>
<tr>
<td align="right"> Last Name:<sup>*</sup></td><td>
<input name="Last_Name" type="text" id="Last_Name" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'" size="25" />
</td>
</tr>
<tr>
<td align="right"> Telephone:<sup>*</sup></td ><td>
<input name="telephone" type="text" id="telephone" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'" value="" size="25">
</td>
</tr>
<tr>
<td align="right"> Street:<sup>*</sup></td><t d>
<textarea name="Street" cols="20" rows="2" id="Street" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></tex tarea>
</td></tr>
<tr>
<td align="right"> City:<sup>*</sup></td><td>
<input name="City" type="text" id="City" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'" size="25" />
</td></tr><tr>
<td align="right"> State:<sup>*</sup></td><td >
<input name="State" type="text" id="State" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'" value="Georgia" size="9" />
</td>
</tr>
<td align="right"> Zip Code:<sup>*</sup></td><td> <input name="Zip_Code" type="text" id="zip2" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'" size="5" maxlength="5" />
</td>
</tr></table>
<h4>Your Academic Standing</h4><br>
<table width="420" cellpadding="6" cellspacing="0"><tr>
<td align="right"> Institution currently attending:<sup>*</sup></td ><td>
<select name="Institution_Currentl y_Enrolled " id="Institution_Currently_ Enrolled">
<option value="">Choose Institution</option>
<%
While (NOT rsInstitutions.EOF)
%>
<option value="<%=(rsInstitutions. Fields.Ite m("instID" ).Value)%> "><%=(rsIn stitutions .Fields.It em("instNa me").Value )%></optio n>
<%
rsInstitutions.MoveNext()
Wend
If (rsInstitutions.CursorType > 0) Then
rsInstitutions.MoveFirst
Else
rsInstitutions.Requery
End If
%>
</select>
</td><tr>
<td align="right"> Class Standing for Fall 2004:<sup>*</sup></td><td>
<select name="Class_Attending_Fall " id="Class_Attending_Fall">
<option value="">Choose Class Standing</option>
<%
While (NOT rsClass.EOF)
%>
<option value="<%=(rsClass.Fields. Item("clas sID").Valu e)%>"><%=( rsClass.Fi elds.Item( "class").V alue)%></o ption>
<%
rsClass.MoveNext()
Wend
If (rsClass.CursorType > 0) Then
rsClass.MoveFirst
Else
rsClass.Requery
End If
%>
</select>
</td></tr><tr>
<td align="right">
Overall College GPA:<sup>*</sup></td><td>
<input name="College_GPA" type="text" id="College_GPA" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'" size="5" maxlength="5" />
</td></tr><tr>
<td align="right">
Overall High School GPA:<sup>*</sup></td><td>
<input name="Highschool_GPA" type="text" id="Highschool_GPA" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'" size="5" maxlength="5" />
</td>
</tr></table>
<p>List all science courses you have taken and grade received in the course. List courses you are currently taking by marking an (X) after the course name. </p>
<table width="420" cellpadding="6" cellspacing="0">
<tr>
<td>Course</td>
<td>Institution</td>
<td>Grade</td>
</tr>
<tr>
<td><input name="course1" type="text" id="course1" size="35" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="institution1" type="text" id="institution1" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="grade1" type="text" id="grade1" size="5" maxlength="5"onFocus="this .className ='currentF ield'" onChange="this.className=' changedFie ld'"></td>
</tr>
<tr>
<tr>
<td><input name="course2" type="text" id="course1" size="35" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="institution2" type="text" id="institution2" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="grade2" type="text" id="grade2" size="5" maxlength="5" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
</tr>
<tr>
<tr>
<td><input name="course3" type="text" id="course3" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'" size="35"></td>
<td><input name="institution3" type="text" id="institution32" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="grade3" type="text" id="grade32" size="5" maxlength="5" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
</tr>
<tr>
<tr>
<td><input name="course4" type="text" id="course4" size="35" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="institution4" type="text" id="institution43" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="grade4" type="text" id="grade4" size="5" maxlength="5" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
</tr>
<tr>
<tr>
<td><input name="course5" type="text" id="course5" size="35" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="institution5" type="text" id="institution5" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="grade5" type="text" id="grade5" size="5" maxlength="5" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
</tr>
<tr>
<tr>
<td><input name="course6" type="text" id="course6" size="35" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="institution6" type="text" id="institution6" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
<td><input name="grade6" type="text" id="grade62" size="5" maxlength="5" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></td>
</tr>
<tr>
</table>
<h4>Transportation</h4>
<p>Do you have transportation to another institution?
<input name="transportation" type="radio" value="True">
Yes
<input name="transportation" type="radio" value="False">
No
</p>
<p>
Do you have access to public transportation?
<input name="publicTransportation " type="radio" value="True">
Yes
<input name="publicTransportation " type="radio" value="False">
No</p>
<h4>Personal Statement<sup>*</sup></h4>
<p>Describe your reasons for wishing to participate in the AURA Fellows program.
Indicate how this opportunity will influence and contribute to your current and
future fields of study. Comment on how this program will impact your career aspirations.
You can copy and paste from another document. If needed, the field below will
scroll down and hold more information. </p>
<p>
<textarea name="Personal_Statement" cols="65" rows="10" wrap="VIRTUAL" id="Personal_Statement" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></tex tarea>
</p>
<p> Is there a particular project or research area that interests you? </p>
<p>
<textarea name="notes1" cols="65" rows="4" wrap="VIRTUAL" id="notes1" onFocus="this.className='c urrentFiel d'" onChange="this.className=' changedFie ld'"></tex tarea>
</p>
<h4>Agreement<sup>*</sup>< /h4>
<p> <input name="Agreement_Checkbox" type="checkbox" id="Agreement_Checkbox" value="Y">
I understand and agree that upon acceptance into the AURA Fellows program, my compensation is dependent on my complete participation in the research program which includes a weekly commitment of 8-10 hours of research per week, attendance at a minimum of 2 special seminars, participation in the AURA poster symposium and the completion of pre and post-evaluation surveys. </p>
<td>
<input type="submit" name="Submit" value="Continue Application">
<input name="ip_address" type="hidden" id="ip_address" value="<%= Request.ServerVariables ("REMOTE_ADDR")%>">
<input name="dateEntered" type="hidden" value="<%=date%>">
<input type="hidden" name="userLevelID" value="2">
<input name="userID" type="hidden" id="userID" value="<%=(rsUsers.Fields. Item("user ID").Value )%>">
<input name="formsubmitted" type="hidden" id="formsubmitted" value="yes">
</td>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%= rsUsers.Fields.Item("userI D").Value %>">
</form>
</body></html>
<%
rsInstitutions.Close()
Set rsInstitutions = Nothing
%>
<%
rsClass.Close()
Set rsClass = Nothing
%>
<%
rsTerm.Close()
Set rsTerm = Nothing
%>
<%
rsUsers.Close()
Set rsUsers = Nothing
%>
<!--#include file="Connections/connSane
<%
if request.Form("submit") = "Continue Application" AND request.Form("Agreement_Ch
Response.Redirect("apply_e
end if
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariabl
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Update Record: set variables
If (CStr(Request("MM_update")
MM_editConnection = MM_connSane1_STRING
MM_editTable = "tblUsers"
MM_editColumn = "userID"
MM_recordId = "" + Request.Form("MM_recordId"
MM_editRedirectUrl = "apply_reference.asp?userI
MM_fieldsStr = "Term_Applying_For|value|F
MM_columnsStr = "termappliedFor|none,none,
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_field
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Update Record: construct a sql update statement and execute it
If (CStr(Request("MM_update")
' create the sql update statement
MM_editQuery = "update " & MM_editTable & " set "
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),"
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_editQuery = MM_editQuery & ","
End If
MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal
Next
MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the update
Set MM_editCmd = Server.CreateObject("ADODB
MM_editCmd.ActiveConnectio
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnectio
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editR
End If
End If
End If
%>
<%
Dim rsInstitutions
Dim rsInstitutions_numRows
Set rsInstitutions = Server.CreateObject("ADODB
rsInstitutions.ActiveConne
rsInstitutions.Source = "SELECT * FROM tblInstitutions"
rsInstitutions.CursorType = 0
rsInstitutions.CursorLocat
rsInstitutions.LockType = 1
rsInstitutions.Open()
rsInstitutions_numRows = 0
%>
<%
Dim rsClass
Dim rsClass_numRows
Set rsClass = Server.CreateObject("ADODB
rsClass.ActiveConnection = MM_connSane1_STRING
rsClass.Source = "SELECT * FROM tblClass"
rsClass.CursorType = 0
rsClass.CursorLocation = 2
rsClass.LockType = 1
rsClass.Open()
rsClass_numRows = 0
%>
<%
Dim rsTerm
Dim rsTerm_numRows
Set rsTerm = Server.CreateObject("ADODB
rsTerm.ActiveConnection = MM_connSane1_STRING
rsTerm.Source = "SELECT * FROM tblTerm ORDER BY term ASC"
rsTerm.CursorType = 0
rsTerm.CursorLocation = 2
rsTerm.LockType = 1
rsTerm.Open()
rsTerm_numRows = 0
%>
<%
Dim rsUsers__MMColParam
rsUsers__MMColParam = "1"
If (Request.QueryString("good
rsUsers__MMColParam = Request.QueryString("goode
End If
%>
<%
Dim rsUsers
Dim rsUsers_numRows
Set rsUsers = Server.CreateObject("ADODB
rsUsers.ActiveConnection = MM_connSane1_STRING
rsUsers.Source = "SELECT email, userID FROM tblUsers WHERE email = '" + Replace(rsUsers__MMColPara
rsUsers.CursorType = 0
rsUsers.CursorLocation = 2
rsUsers.LockType = 1
rsUsers.Open()
rsUsers_numRows = 0
%>
<form ACTION="<%=MM_editAction%>
<h3>Step 3: Personal & Academic Information </h3>
<h4>Term<span class="alert" style="font-size:11px">&nb
<table width="420"cellpadding="6"
<select name="Term_Applying_For" id="Term_Applying_For">
<option value="">Choose Term</option>
<%
While (NOT rsTerm.EOF)
%>
<option value="<%=(rsTerm.Fields.I
<%
rsTerm.MoveNext()
Wend
If (rsTerm.CursorType > 0) Then
rsTerm.MoveFirst
Else
rsTerm.Requery
End If
%>
</select>
</td></tr></table>
<h4>Personal Information</h4><br>
<table width="420" cellpadding="6" cellspacing="0"><tr>
<td align="right"> First Name:<sup>*</sup></td><td>
<input name="First_Name" type="text" id="First_Name" onFocus="this.className='c
</td>
</tr>
<tr>
<td align="right"> Middle Name: </td><td align="left">
<input name="Middle_Name" type="text" id="Middle_Name" onFocus="this.className='c
</td></tr>
<tr>
<td align="right"> Last Name:<sup>*</sup></td><td>
<input name="Last_Name" type="text" id="Last_Name" onFocus="this.className='c
</td>
</tr>
<tr>
<td align="right"> Telephone:<sup>*</sup></td
<input name="telephone" type="text" id="telephone" onFocus="this.className='c
</td>
</tr>
<tr>
<td align="right"> Street:<sup>*</sup></td><t
<textarea name="Street" cols="20" rows="2" id="Street" onFocus="this.className='c
</td></tr>
<tr>
<td align="right"> City:<sup>*</sup></td><td>
<input name="City" type="text" id="City" onFocus="this.className='c
</td></tr><tr>
<td align="right"> State:<sup>*</sup></td><td
<input name="State" type="text" id="State" onFocus="this.className='c
</td>
</tr>
<td align="right"> Zip Code:<sup>*</sup></td><td>
</td>
</tr></table>
<h4>Your Academic Standing</h4><br>
<table width="420" cellpadding="6" cellspacing="0"><tr>
<td align="right"> Institution currently attending:<sup>*</sup></td
<select name="Institution_Currentl
<option value="">Choose Institution</option>
<%
While (NOT rsInstitutions.EOF)
%>
<option value="<%=(rsInstitutions.
<%
rsInstitutions.MoveNext()
Wend
If (rsInstitutions.CursorType
rsInstitutions.MoveFirst
Else
rsInstitutions.Requery
End If
%>
</select>
</td><tr>
<td align="right"> Class Standing for Fall 2004:<sup>*</sup></td><td>
<select name="Class_Attending_Fall
<option value="">Choose Class Standing</option>
<%
While (NOT rsClass.EOF)
%>
<option value="<%=(rsClass.Fields.
<%
rsClass.MoveNext()
Wend
If (rsClass.CursorType > 0) Then
rsClass.MoveFirst
Else
rsClass.Requery
End If
%>
</select>
</td></tr><tr>
<td align="right">
Overall College GPA:<sup>*</sup></td><td>
<input name="College_GPA" type="text" id="College_GPA" onFocus="this.className='c
</td></tr><tr>
<td align="right">
Overall High School GPA:<sup>*</sup></td><td>
<input name="Highschool_GPA" type="text" id="Highschool_GPA" onFocus="this.className='c
</td>
</tr></table>
<p>List all science courses you have taken and grade received in the course. List courses you are currently taking by marking an (X) after the course name. </p>
<table width="420" cellpadding="6" cellspacing="0">
<tr>
<td>Course</td>
<td>Institution</td>
<td>Grade</td>
</tr>
<tr>
<td><input name="course1" type="text" id="course1" size="35" onFocus="this.className='c
<td><input name="institution1" type="text" id="institution1" onFocus="this.className='c
<td><input name="grade1" type="text" id="grade1" size="5" maxlength="5"onFocus="this
</tr>
<tr>
<tr>
<td><input name="course2" type="text" id="course1" size="35" onFocus="this.className='c
<td><input name="institution2" type="text" id="institution2" onFocus="this.className='c
<td><input name="grade2" type="text" id="grade2" size="5" maxlength="5" onFocus="this.className='c
</tr>
<tr>
<tr>
<td><input name="course3" type="text" id="course3" onFocus="this.className='c
<td><input name="institution3" type="text" id="institution32" onFocus="this.className='c
<td><input name="grade3" type="text" id="grade32" size="5" maxlength="5" onFocus="this.className='c
</tr>
<tr>
<tr>
<td><input name="course4" type="text" id="course4" size="35" onFocus="this.className='c
<td><input name="institution4" type="text" id="institution43" onFocus="this.className='c
<td><input name="grade4" type="text" id="grade4" size="5" maxlength="5" onFocus="this.className='c
</tr>
<tr>
<tr>
<td><input name="course5" type="text" id="course5" size="35" onFocus="this.className='c
<td><input name="institution5" type="text" id="institution5" onFocus="this.className='c
<td><input name="grade5" type="text" id="grade5" size="5" maxlength="5" onFocus="this.className='c
</tr>
<tr>
<tr>
<td><input name="course6" type="text" id="course6" size="35" onFocus="this.className='c
<td><input name="institution6" type="text" id="institution6" onFocus="this.className='c
<td><input name="grade6" type="text" id="grade62" size="5" maxlength="5" onFocus="this.className='c
</tr>
<tr>
</table>
<h4>Transportation</h4>
<p>Do you have transportation to another institution?
<input name="transportation" type="radio" value="True">
Yes
<input name="transportation" type="radio" value="False">
No
</p>
<p>
Do you have access to public transportation?
<input name="publicTransportation
Yes
<input name="publicTransportation
No</p>
<h4>Personal Statement<sup>*</sup></h4>
<p>Describe your reasons for wishing to participate in the AURA Fellows program.
Indicate how this opportunity will influence and contribute to your current and
future fields of study. Comment on how this program will impact your career aspirations.
You can copy and paste from another document. If needed, the field below will
scroll down and hold more information. </p>
<p>
<textarea name="Personal_Statement" cols="65" rows="10" wrap="VIRTUAL" id="Personal_Statement" onFocus="this.className='c
</p>
<p> Is there a particular project or research area that interests you? </p>
<p>
<textarea name="notes1" cols="65" rows="4" wrap="VIRTUAL" id="notes1" onFocus="this.className='c
</p>
<h4>Agreement<sup>*</sup><
<p> <input name="Agreement_Checkbox" type="checkbox" id="Agreement_Checkbox" value="Y">
I understand and agree that upon acceptance into the AURA Fellows program, my compensation is dependent on my complete participation in the research program which includes a weekly commitment of 8-10 hours of research per week, attendance at a minimum of 2 special seminars, participation in the AURA poster symposium and the completion of pre and post-evaluation surveys. </p>
<td>
<input type="submit" name="Submit" value="Continue Application">
<input name="ip_address" type="hidden" id="ip_address" value="<%= Request.ServerVariables ("REMOTE_ADDR")%>">
<input name="dateEntered" type="hidden" value="<%=date%>">
<input type="hidden" name="userLevelID" value="2">
<input name="userID" type="hidden" id="userID" value="<%=(rsUsers.Fields.
<input name="formsubmitted" type="hidden" id="formsubmitted" value="yes">
</td>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%= rsUsers.Fields.Item("userI
</form>
</body></html>
<%
rsInstitutions.Close()
Set rsInstitutions = Nothing
%>
<%
rsClass.Close()
Set rsClass = Nothing
%>
<%
rsTerm.Close()
Set rsTerm = Nothing
%>
<%
rsUsers.Close()
Set rsUsers = Nothing
%>
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cristy, that's the way DW writes the code. I think -1,0 stands for the type of checkbox I chose when I had DW write the Insert statement. It provides for several types of checkbox. And I tried Checkbox -1,0, checkbox 1,0, and one that it called Checkbox Access. None of them worked.
Here's the code:
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Update Record: set variables
If (CStr(Request("MM_update") ) = "form1" And CStr(Request("MM_recordId" )) <> "") Then
MM_editConnection = MM_connSane1_STRING
MM_editTable = "tblUsers"
MM_editColumn = "userID"
MM_recordId = "" + Request.Form("MM_recordId" ) + ""
MM_editRedirectUrl = "apply_reference.asp?userI D=" & request.Form("userID")
MM_fieldsStr = "Term_Applying_For|value|F irst_Name| value|Midd le_Name|va lue|Last_N ame|value| telephone| value|Stre et|value|C ity|value| Zip_Code|v alue|Insti tution_Cur rently_Enr olled|valu e|Class_At tending_Fa ll|value|C ollege_GPA |value|Hig hschool_GP A|value|co urse1|valu e|institut ion1|value |grade1|va lue|course 2|value|in stitution2 |value|gra de2|value| course3|va lue|instit ution3|val ue|grade3| value|cour se4|value| institutio n4|value|g rade4|valu e|course5| value|inst itution5|v alue|grade 5|value|co urse6|valu e|institut ion6|value |grade6|va lue|transp ortation|v alue|publi cTransport ation|valu e|Personal _Statement |value|not es1|value| Agreement_ Checkbox|v alue|ip_ad dress|valu e|dateEnte red|value| userLevelI D|value"
MM_columnsStr = "termappliedFor|none,none, NULL|fname |',none,'' |mname|',n one,''|lna me|',none, ''|telepho ne|',none, ''|street| ',none,''| city|',non e,''|state |',none,'' |instituti on|none,no ne,NULL|cl assStandin g|none,non e,NULL|col legeGPA|', none,''|hi ghschoolGP A|',none,' '|course1| ',none,''| institutio n1|',none, ''|grade1| ',none,''| course2|', none,''|in stitution2 |',none,'' |grade2|', none,''|co urse3|',no ne,''|inst itution3|' ,none,''|g rade3|',no ne,''|cour se4|',none ,''|instit ution4|',n one,''|gra de4|',none ,''|course 5|',none,' '|institut ion5|',non e,''|grade 5|',none,' '|course6| ',none,''| institutio n6|',none, ''|grade6| ',none,''| transporta tion|none, -1,0|publi cTransport ation|none ,-1,0|Pers onalStatem ent|',none ,''|notes1 |',none,'' |signature |none,1,0| ip_address |',none,'' |dateEnter ed|',none, NULL|userL evelID|non e,none,NUL L"
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_field s(MM_i)))
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Update Record: construct a sql update statement and execute it
If (CStr(Request("MM_update") ) <> "" And CStr(Request("MM_recordId" )) <> "") Then
' create the sql update statement
MM_editQuery = "update " & MM_editTable & " set "
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1)," ,")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","'' ") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_editQuery = MM_editQuery & ","
End If
MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal
Next
MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the update
Set MM_editCmd = Server.CreateObject("ADODB .Command")
MM_editCmd.ActiveConnectio n = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnectio n.Close
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editR edirectUrl )
End If
End If
End If
%>
Here's the code:
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Update Record: set variables
If (CStr(Request("MM_update")
MM_editConnection = MM_connSane1_STRING
MM_editTable = "tblUsers"
MM_editColumn = "userID"
MM_recordId = "" + Request.Form("MM_recordId"
MM_editRedirectUrl = "apply_reference.asp?userI
MM_fieldsStr = "Term_Applying_For|value|F
MM_columnsStr = "termappliedFor|none,none,
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_field
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Update Record: construct a sql update statement and execute it
If (CStr(Request("MM_update")
' create the sql update statement
MM_editQuery = "update " & MM_editTable & " set "
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),"
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_editQuery = MM_editQuery & ","
End If
MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal
Next
MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the update
Set MM_editCmd = Server.CreateObject("ADODB
MM_editCmd.ActiveConnectio
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnectio
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editR
End If
End If
End If
%>
Sorry, I don't quite understand the DW code.
But I just find out one thing, when u insert data to your table, the value for transportation should be true or false in the insert statement, instead of "true" or "false".
there should not be any quotaion "" for the true or false. I am not sure if this is the point where your problem occurs. I am sorry that I can't help u much in this question.
Cristy
But I just find out one thing, when u insert data to your table, the value for transportation should be true or false in the insert statement, instead of "true" or "false".
there should not be any quotaion "" for the true or false. I am not sure if this is the point where your problem occurs. I am sorry that I can't help u much in this question.
Cristy
Please try to do this if you havent still solved ur problem.
Before inserting data into the table check that you are recieving the right value by printing them on screen.
Then you may try to CInt or define them true or false by case.
..
Before inserting data into the table check that you are recieving the right value by printing them on screen.
Then you may try to CInt or define them true or false by case.
..
use true or false
I believe Access knows the difference and knows how to convert true/false to yes/no.
Make sure though that the true/false is NOT passed as a string.
So your first bit on the form is:
<input name="publicTransportation " type="radio" value="true">Yes
<input name="publicTransportation " type="radio" value="false"> No
and on your second page:
sPublicTrans = CBool(request.form("public Transporta tion"))
This will take the true/false as a string and convert it into true/false as a bool. When writing this to the DB access should store it ok.
I believe Access knows the difference and knows how to convert true/false to yes/no.
Make sure though that the true/false is NOT passed as a string.
So your first bit on the form is:
<input name="publicTransportation
<input name="publicTransportation
and on your second page:
sPublicTrans = CBool(request.form("public
This will take the true/false as a string and convert it into true/false as a bool. When writing this to the DB access should store it ok.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi alorentz,
I tried changing to
<input name="publicTransportation " type="radio" value="Yes">
Yes
<input name="publicTransportation " type="radio" value="No">
No</p>
and the problem continues. Access keeps recording true regardless of what the user checks.
JagC: Do you know where in my code I should put sPublicTrans = CBool(request.form("public Transporta tion")) ?
I tried building a form and I definetly getting the value of True and False or Yes/No: http://www.aurafellows.net/aura/testForm.asp
I tried changing to
<input name="publicTransportation
Yes
<input name="publicTransportation
No</p>
and the problem continues. Access keeps recording true regardless of what the user checks.
JagC: Do you know where in my code I should put sPublicTrans = CBool(request.form("public
I tried building a form and I definetly getting the value of True and False or Yes/No: http://www.aurafellows.net/aura/testForm.asp
Then the problem in the SQL that Dreamweaver built....of course :)
sPublicTrans = CBool(request.form("public Transporta tion"))
goes, er, yeah, dreamweaver code. We had a site built entirely from DW stuff - 2 months later I ripped it apart and rewote it...
k, ignore what I said.
try changing:
MM_columnsStr = "termappliedFor|none,none, NULL|fname |',none,'' |mname|',n one,''|lna me|',none, ''|telepho ne|',none, ''|street| ',none,''| city|',non e,''|state |',none,'' |instituti on|none,no ne,NULL|cl assStandin g|none,non e,NULL|col legeGPA|', none,''|hi ghschoolGP A|',none,' '|course1| ',none,''| institutio n1|',none, ''|grade1| ',none,''| course2|', none,''|in stitution2 |',none,'' |grade2|', none,''|co urse3|',no ne,''|inst itution3|' ,none,''|g rade3|',no ne,''|cour se4|',none ,''|instit ution4|',n one,''|gra de4|',none ,''|course 5|',none,' '|institut ion5|',non e,''|grade 5|',none,' '|course6| ',none,''| institutio n6|',none, ''|grade6| ',none,''| transporta tion|none, -1,0|publi cTransport ation|none ,-1,0|Pers onalStatem ent|',none ,''|notes1 |',none,'' |signature |none,1,0| ip_address |',none,'' |dateEnter ed|',none, NULL|userL evelID|non e,none,NUL L"
to
MM_columnsStr = "termappliedFor|none,none, NULL|fname |',none,'' |mname|',n one,''|lna me|',none, ''|telepho ne|',none, ''|street| ',none,''| city|',non e,''|state |',none,'' |instituti on|none,no ne,NULL|cl assStandin g|none,non e,NULL|col legeGPA|', none,''|hi ghschoolGP A|',none,' '|course1| ',none,''| institutio n1|',none, ''|grade1| ',none,''| course2|', none,''|in stitution2 |',none,'' |grade2|', none,''|co urse3|',no ne,''|inst itution3|' ,none,''|g rade3|',no ne,''|cour se4|',none ,''|instit ution4|',n one,''|gra de4|',none ,''|course 5|',none,' '|institut ion5|',non e,''|grade 5|',none,' '|course6| ',none,''| institutio n6|',none, ''|grade6| ',none,''| transporta tion|none, -1,0|publi cTransport ation|none ,-1,0|Pers onalStatem ent|',none ,''|notes1 |',none,'' |signature |none,true ,false|ip_ address|', none,''|da teEntered| ',none,NUL L|userLeve lID|none,n one,NULL"
goes, er, yeah, dreamweaver code. We had a site built entirely from DW stuff - 2 months later I ripped it apart and rewote it...
k, ignore what I said.
try changing:
MM_columnsStr = "termappliedFor|none,none,
to
MM_columnsStr = "termappliedFor|none,none,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
JagC,
|transportation|none,false ,true|publ icTranspor tation|non e,false,tr ue|
inserts NO all the time.
|transportation|none,true, false |publicTransportation|none ,true,fals e |
inserts Yes all the time.
This is weird.
|transportation|none,false
inserts NO all the time.
|transportation|none,true,
inserts Yes all the time.
This is weird.
ASKER
I just built another form with DW insert statement and tried all kinds of different combinations: http://www.aurafellows.net/aura/testForm_insert.asp
http://www.aurafellows.net/aura/testForm_insert.asp
MM_columnsStr = "publicTransport|none,0,1"
MM_columnsStr = "publicTransport|none,1,0"
MM_columnsStr = "publicTransport|none,0,-1 "
MM_columnsStr = "publicTransport|none,0,-1 "
MM_columnsStr = "publicTransport|none,true ,false"
MM_columnsStr = "publicTransport|none,true ,false"
All of above either produce true all the time or false all the time.
html is:
<form name="form1" action="<%=MM_editAction%> " method="POST">
<p>Do you have transportation to another institution?
<input name="publicTransportation " type="radio" value="Yes">
Yes
<input name="publicTransportation " type="radio" value="No">
No
</p>
<p><input name="submit" type="submit">
<input type="hidden" name="MM_insert" value="form1">
</form>
http://www.aurafellows.net/aura/testForm_insert.asp
MM_columnsStr = "publicTransport|none,0,1"
MM_columnsStr = "publicTransport|none,1,0"
MM_columnsStr = "publicTransport|none,0,-1
MM_columnsStr = "publicTransport|none,0,-1
MM_columnsStr = "publicTransport|none,true
MM_columnsStr = "publicTransport|none,true
All of above either produce true all the time or false all the time.
html is:
<form name="form1" action="<%=MM_editAction%>
<p>Do you have transportation to another institution?
<input name="publicTransportation
Yes
<input name="publicTransportation
No
</p>
<p><input name="submit" type="submit">
<input type="hidden" name="MM_insert" value="form1">
</form>
ASKER
Any more ideas? I'm still stuck with this problem. Haven't been able to find any answers else where on the web.
ASKER
I found the answer to this problem on the DW forum on Macromedia site.
Turns out for radio buttons, in DW one has to have the insert dialog submit the data as TEXT.
What is the procedure for closing a question if I found my answer elsewhere?
Turns out for radio buttons, in DW one has to have the insert dialog submit the data as TEXT.
What is the procedure for closing a question if I found my answer elsewhere?
ASKER
But no matter that user checks NO, Access always records it as True.