ciao a tutti, da 2 giorni che faccio questo e mi sta scoppiando il cervello, potreste farvi un'occhiata su questi codici?

codice:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>

<%
Dim tecnico__MMColParam
tecnico__MMColParam = "1"
If (Session("MM_Username") <> "") Then 
  tecnico__MMColParam = Session("MM_Username")
End If
%>
<%
'variabili di sessione per il refresh

session("tipologia") = Request.Form("tipologia")
session("selmod01") = Request.Form("selmod01")
session("selvoce") = Request.Form("selvoce")
session("tecnici_soft") = Request.Form("tecnici_soft")
session("piano") = Request.Form("piano")
session("stanza") = Request.Form("stanza")
session("note") = Request.Form("note")
session("data") = Request.Form("data")
if session("data") = "" then
	session("data") = date()
end if
%>
<%
function selezionaOption(valueInput,finestra)
  If cstr(valueInput) = cstr(session(finestra)) then
    selezionaOption = "selected"
  else
	selezionaOption = ""
  end if
end function
%>
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers="A"
MM_authFailedURL="login.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
  If (false Or CStr(Session("MM_UserAuthorization"))="") Or _
         (InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
    MM_grantAccess = true
  End If
End If
If Not MM_grantAccess Then
  MM_qsChar = "?"
  If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
  MM_referrer = Request.ServerVariables("URL")
  if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
  MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
  Response.Redirect(MM_authFailedURL)
End If
%>
<%
Dim tecnico
Dim tecnico_numRows

Set tecnico = Server.CreateObject("ADODB.Recordset")
tecnico.ActiveConnection = MM_siman_STRING
tecnico.Source = "SELECT *  FROM SIMAN.TECNICI_SOFTLAB  WHERE MATRICOLA = '" + Replace(tecnico__MMColParam, "'", "''") + "' AND ATTIVO = 'S'"
tecnico.CursorType = 0
tecnico.CursorLocation = 2
tecnico.LockType = 1
tecnico.Open()

tecnico_numRows = 0
%>
<%
Dim tipologia
Dim tipologia_numRows

Set tipologia = Server.CreateObject("ADODB.Recordset")
tipologia.ActiveConnection = MM_siman_STRING
tipologia.Source = "SELECT * FROM SIMAN.TIPOLOGIA"
tipologia.CursorType = 0
tipologia.CursorLocation = 2
tipologia.LockType = 1
tipologia.Open()

tipologia_numRows = 0
%>
<%
Dim Mod01
Dim Mod01_numRows

Set Mod01 = Server.CreateObject("ADODB.Recordset")
Mod01.ActiveConnection = MM_siman_STRING
if session("tipologia") <> "" then
Mod01.Source = "SELECT DISTINCT MZ.ID_MZ01, MZ.DATA FROM MZ01 MZ, VOCI_MZ01 VOCI WHERE MZ.ID_MZ01 = VOCI.ID_MZ01 AND VOCI.ESITO = 'N' AND ID_TIPOLOGIA = " & session("tipologia") 
Mod01.CursorType = 0
Mod01.CursorLocation = 2
Mod01.LockType = 1
Mod01.Open()
Mod01_numRows = 0
end if
%>
<%
Dim Voci
Dim Voci_numRows

Set Voci = Server.CreateObject("ADODB.Recordset")
Voci.ActiveConnection = MM_siman_STRING
if session("selmod01") <> "" then
Voci.Source = "SELECT VT.DESCRIZIONE, VT.ID_VOCE_TIPOLOGIA FROM VOCI_TIPOLOGIA VT, VOCI_MZ01 V01 WHERE V01.ID_MZ01 = " & session("selmod01") & " AND V01.ESITO = 'N' AND V01.ID_VOCE_MZ01 = VT.ID_VOCE_TIPOLOGIA"
Voci.CursorType = 0
Voci.CursorLocation = 2
Voci.LockType = 1
'Response.write(Voci.Source)
'response.End()
Voci.Open()
Voci_numRows = 0

end if
%>
<!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>SIMAN - Modulo MZ02</title>
<style type="text/css">
<!--
body {
	background-color: #003366;
}
body,td,th {
	color: #FFFF00;
}
.style1 {
	font-size: 14px;
	font-weight: bold;
}
-->
</style>
<script type="text/JavaScript">
<!--
function refresh(){
	form1.action="insmod02.asp";
	form1.submit();
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onload="MM_preloadImages('indietro_r2_c1_f2.jpg')">
<table align="center" bgcolor="#003366" border="0" cellpadding="0" cellspacing="0" width="600">
  
  <tr>
    <td>[img]immagini/spacer.gif[/img]</td>
    <td>[img]immagini/spacer.gif[/img]</td>
    <td>[img]immagini/spacer.gif[/img]</td>
    <td>[img]immagini/spacer.gif[/img]</td>
    <td>[img]immagini/spacer.gif[/img]</td>
    <td>[img]immagini/spacer.gif[/img]</td>
  </tr>
  <tr>
    <td colspan="5">[img]immagini/mod02_r1_c1.jpg[/img]</td>
    <td>[img]immagini/spacer.gif[/img]</td>
  </tr>
  <tr>
    <td colspan="5" bgcolor="#003366">[img]immagini/spacer.gif[/img]</td>
    <td>[img]immagini/spacer.gif[/img]</td>
  </tr>
  <tr>
    <td colspan="5" valign="top" bgcolor="#003366"><form id="form1" name="form1" method="post" action="">
      <table width="90%" border="1" align="center">
        <tr>
          <td width="28%" class="style1"></td>
          <td></td>
          <td><div align="center"><span class="style1">Utente:
          </span>  
            <input name="utente" type="text" id="utente" maxlength="60" />
          </div></td>
        </tr>
        <tr>
          <td class="style1"><span class="style1">Tipologia:</span></td>
          <td width="53%"><select name="tipologia" id="tipologia" onchange="refresh()">
            
            
		  onchange="document.form1.tblapp.style.display = (document.form1.tblapp.style.display == 'none') ? 'yes' : 'none';>
           <option value="">Seleziona tipologia</option>
		    <%
While (NOT tipologia.EOF)
%>
            <option value="<%=(tipologia.Fields.Item("ID_TIPOLOGIA").Value)%>" <%=selezionaOption(tipologia.Fields.Item("ID_TIPOLOGIA").Value,"tipologia")%>><%=(tipologia.Fields.Item("DESCRIZIONE").Value)%></option>
            <%
  tipologia.MoveNext()
Wend
If (tipologia.CursorType > 0) Then
  tipologia.MoveFirst
Else
  tipologia.Requery
End If
%>
          </select>          </td>
          <td width="19%"></td>
        </tr>
        <tr>
          <td class="style1">Mod01:
	<%=SESSION("TIPOLOGIA")%>
	<%=SESSION("selmod01")%>
	<%=SESSION("selvoce")%>	</td>
          <td><select name="selmod01" id="selmod01" onchange="refresh()" style="width:200px">
           
			<%
if session("tipologia") <> "" then %>
<% if Mod01.Eof then%>
<option value="-1">Nessun modulo in questa tipologia</option>
<%else%>
 <option value="">Seleziona il modulo</option>
<%
While (NOT Mod01.EOF)
%>

            <option value="<%=(Mod01.Fields.Item("ID_MZ01").Value)%>" <%=selezionaOption(Mod01.Fields.Item("ID_MZ01").Value, "selmod01")%>>Modello MZ01 del <%=(Mod01.Fields.Item("DATA").Value)%></option>
            <%
  Mod01.MoveNext()
Wend
If (Mod01.CursorType > 0) Then
  Mod01.MoveFirst
Else
  Mod01.Requery
End If
end if
%>
<% end if %>
          </select></td>
          <td></td>
        </tr>
        <tr>
          <td class="style1">Voce:</td>
          <td colspan="2"><select name="selvoce" id="selvoce" style="width:450px">
          <%
if session("selmod01") <> "" then
%>
<% if Voci.Eof and session("selmod01")="-1"then%>
<option value="-1">Nessun voce in questo modulo</option>
<%else%>
<% if session("selmod01")="" then %>
 <option value="">Seleziona la voce</option>
 <%
While (NOT Voci.EOF)%>
            <option value="<%=(Voci.Fields.Item("ID_VOCE_TIPOLOGIA").Value)%>">
<%IF LEN(Voci.Fields.Item("DESCRIZIONE").Value) > 50 then%>
	<%=left(Voci.Fields("DESCRIZIONE"),50) & "..."%>
<%else%>
	<%=Voci.Fields.Item("DESCRIZIONE").Value%>
<%end if%>
</option>
<%
  Voci.MoveNext()
Wend
If (Voci.CursorType > 0) Then
  Voci.MoveFirst
Else
  Voci.Requery
End If
end if
%>
<% end if %>
<% end if %>
          </select></td>
          </tr>
      </table>
     <% if cstr(request.Form("tipologia")) = "1" then %>
	  <table width="90%" border="1" align="center" id="tblapp" style="display:yes">
        <tr>
          <td width="22%" class="style1">Cod.Softlab:</td>
          <td width="30%"><input name="textfield" type="text" size="15" maxlength="8" /></td>
          <td width="24%" class="style1">Marca:</td>
          <td width="24%"><input type="text" name="textfield3" /></td>
        </tr>
        <tr>
          <td class="style1">Serial Number: </td>
          <td><input name="textfield2" type="text" size="15" maxlength="8" /></td>
          <td colspan="2"></td>
        </tr>
      </table>
	  <% end if %>
	  

	  
        </form>
    </td>
    <td>
	[img]immagini/spacer.gif[/img]</td>
  </tr>
</table>
<span style="margin:0px">[img]indietro_r2_c1.jpg[/img]</span>


</p>
</body>
</html>
<%
session("tipologia") = ""
session("selmod01") = ""
session("selvoce") = ""
%>
<%
tecnico.Close()
Set tecnico = Nothing
%>
<%
tipologia.Close()
set tipologia = Nothing
%>
<%
if session("tipologia") <> "" then
Mod01.Close()
Set Mod01 = Nothing
end if
%>
<%
if session("selmod01") <> "" then
Voci.Close()
Set Voci = Nothing
end if
%>
sinceramente i select fanno dei capricci perchè spesso selmod01 e selvoce fanno "bianco" e poi ho modificato e quando seleziono selmod01 e selvoce funziona e quando cambio tipologia e selvoce rimane fermo..... tutto questo mi fa scoppiare la testa, help help help proprio sto facendo il progetto urgente perchè in questa settimana deve venire l'ispezione in questa società che se non trovasse funzionante il sistema manutenzione, sono rovinato...
Grazie di cuore.
Gabriele