Hi Rob - thanks so much for taking a look - you are right -
and I was able to actually make it work late last night - that is
the drop down - finally takes the user to a page with the selected
record form the drop-down. However, this is where i am completely
lost - as I want to use that page to update one field in that
record - right now - if you edit the AccessLevel form field and
click on the Update button - nothing happens - if you have a moment
and see anything obvious - lmk - all I have been trying to do in
total is allow a user to selct a record and edit one firled in that
record and update.
<%@LANGUAGE="JAVASCRIPT"%>
<!--#include file="Connections/caspa.asp" -->
<%
// *** Edit Operations: declare variables
// set the form action variable
var MM_editAction = Request.ServerVariables("SCRIPT_NAME");
if (Request.QueryString) {
MM_editAction += "?" +
Server.HTMLEncode(Request.QueryString);
}
// boolean to abort record edit
var MM_abortEdit = false;
%>
<%
if (String(Request("MM_update")) == "form1") {
if (!MM_abortEdit) {
// execute the update
var MM_editCmd = Server.CreateObject ("ADODB.Command");
MM_editCmd.ActiveConnection = MM_caspa_STRING;
MM_editCmd.CommandText = "UPDATE [Access] SET userGroup = ?
WHERE Field1 = ?";
MM_editCmd.Prepared = true;
MM_editCmd.Parameters.Append(MM_editCmd.CreateParameter("param1",
201, 1, -1, Request.Form("AccessLevel"))); // adLongVarChar
MM_editCmd.Parameters.Append(MM_editCmd.CreateParameter("param2",
-1, 1, -1, (String(Request.Form("MM_recordId")) != "undefined"
&& String(Request.Form("MM_recordId")) != "") ?
Request.Form("MM_recordId") : null)); // N/A
MM_editCmd.Execute();
MM_editCmd.ActiveConnection.Close();
// append the query string to the redirect URL
var MM_editRedirectUrl = "update_success.asp";
if (MM_editRedirectUrl && Request.QueryString
&& Request.QueryString.Count > 0) {
MM_editRedirectUrl += ((MM_editRedirectUrl.indexOf('?') ==
-1) ? "?" : "&") + Request.QueryString;
}
Response.Redirect(MM_editRedirectUrl)
}
}
%>
<%
var Recordset1__MMColParam = "1";
if (String(Request.QueryString("Field1")) != "undefined"
&&
String(Request.QueryString("Field1")) != "") {
Recordset1__MMColParam =
String(Request.QueryString("Field1"));
}
%>
<%
var Recordset1_cmd = Server.CreateObject ("ADODB.Command");
Recordset1_cmd.ActiveConnection = MM_caspa_STRING;
Recordset1_cmd.CommandText = "SELECT Field1, userGroup FROM
[Access] WHERE Field1 = ?";
Recordset1_cmd.Prepared = true;
Recordset1_cmd.Parameters.Append(Recordset1_cmd.CreateParameter("param1",
200, 1, 255, Recordset1__MMColParam)); // adVarChar
var Recordset1 = Recordset1_cmd.Execute();
var Recordset1_numRows = 0;
%>
<%
var resultSet__MMColParam = "1";
if (String(Request.QueryString("email")) != "undefined"
&&
String(Request.QueryString("email")) != "") {
resultSet__MMColParam =
String(Request.QueryString("email"));
}
%>
<%
var resultSet_cmd = Server.CreateObject ("ADODB.Command");
resultSet_cmd.ActiveConnection = MM_caspa_STRING;
resultSet_cmd.CommandText = "SELECT Field1, userGroup FROM
[Access] WHERE Field1 = ? ORDER BY Field1 DESC";
resultSet_cmd.Prepared = true;
resultSet_cmd.Parameters.Append(resultSet_cmd.CreateParameter("param1",
200, 1, 255, resultSet__MMColParam)); // adVarChar
var resultSet = resultSet_cmd.Execute();
var resultSet_numRows = 0;
%>
<%
var resultsSet__MMColParam = "1";
if (String(Request.QueryString("email")) != "undefined"
&&
String(Request.QueryString("email")) != "") {
resultsSet__MMColParam =
String(Request.QueryString("email"));
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>CASPA - Connecticut Association of School
Personnel Administrators</title>
<script src="WA_Cookies/Cookies.js"></script>
<link href="caspa.css" rel="stylesheet" type="text/css"
/></head>
<body>
<a name="top" id="top"></a>
<p> </p>
<table width="806" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td width="806" height="135" align="left"
valign="top"><img src="img/nav/header.jpg" alt="CASPA"
width="806" height="135" /></td>
</tr>
<tr>
<td align="left" valign="top"
background="img/nav/bkg_whole_page_rht_lft_bord.jpg"><table
width="806" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="193" align="left" valign="top">
<!--#include file="menu.html" -->
<p> </p></td>
<td width="613" align="left" valign="top">
<p align="right"> <span class="style3">(<a
href="<%= MM_Logout %>"
class="style3">logout</a>)</span>
</p>
<p align="center" class="style3">CASPA Admin -Set
Member Access Level ( back to <a href="admin.asp">admin
homepage</a>) <strong></strong></p>
<p align="left" class="style3">Directions:</p>
<ol>
<li class="style2">Edit Current Access Level field -
"admin", "basic", or
"none" </li>
<li class="style2">Click Update Access Level
</li>
</ol>
<form ACTION="<%=MM_editAction%>" METHOD="POST"
id="form1" name="form1">
<table width="65%" border="1" cellspacing="0"
cellpadding="4">
<tr>
<td width="66%"><span class="style3">Member's
E-mail Address</span> <br />
<span
class="style2"><%=(resultSet.Fields.Item("Field1").Value)%></span></td>
<td width="34%"><span class="style3">Current
Access Level</span><br />
<input name="AccessLevel" type="text" class="style2"
id="AccessLevel"
value="<%=(resultSet.Fields.Item("userGroup").Value)%>"
/></td>
</tr>
</table>
<label><br />
</label>
<label></label>
<p>
<label>
<input type="submit" name="Submit" value="Update Access
Level" />
</label>
</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId">
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%=
resultSet.Fields.Item("Field1").Value %>">
</form>
<p> </p> </td>
</tr>
</table></td>
</tr>
<tr>
<td width="806" height="13" align="left"
valign="top"><img src="img/nav/bottom.jpg" alt="CASPA"
width="806" height="13" /></td>
</tr>
<tr>
<td height="13" align="left" valign="top">
<!--#include file="footer.html" -->
</td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close();
%>
<%
resultSet.Close();
%>