hola, Al Zuwaga el codigo que me mandaste si filtra esa opcion y no me manda error, pero tampoco me imprime nada, y hasta donde estuve checando hoy el error no es el value, ni la sentencia, esta en la concatenacion de & Request.Form("nombreText") o & Request.Form("Producto"), ya que esto no tiene ningun valor, no tiene nada y cuando lo imprimo, no me improme ningun valor.
Este es mi codigo actual:
Código HTML:
<%@ Language=VBScript%>
<% Dim oConn,strSQL, objRS, var
Set oConn = Server.CreateObject("ADODB.Connection")
set rs=Server.CreateObject("ADODB.Recordset")
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("./Ventas.mdb"))%>
<html> <head>
<link rel="STYLESHEET" type="text/css" href="css/letras.css">
<meta http-equiv="Content-Language" content="es">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Ventas</title> </head>
<body>
<h1 align="center">Venta de productos</h1>
<form name="combo" Method="POST">
<p align="center">Seleccione el producto a comprar:
<select name="Producto"
onchange="nombreText.value = this.options[this.selectedIndex].value">
<% strSQL = "SELECT * FROM Productos ORDER BY Productos"
Set RS = oConn.Execute(strSQL)
while not Rs.EOF%>
<option value="<%=rs("Id")%>"> <%=rs("Productos")%></option>
<%Rs.movenext
wend
Rs.close%> </select>
<input type="text" name="nombreText" size="5">
<table border="1" width="80%" height="58" align="center">
<tr>
<td width="25%" height="1" align="center">
<p align="center"><b>PRODUCTOS</b></p>
</td><td width="13%" height="1" align="center">
<p align="center"><b>Cantidad</b></p>
</td>
<td width="12%" height="1" align="center">
<p align="center"><b>Comprar</b></p>
</td><td width="21%" height="1" align="center">
<p align="center"><b>Precio</b></p>
</td>
<td width="29%" height="1" align="center">
<p align="center"><b>Sub-Total</b></p>
</td>
</tr>
<tr>
<td width="25%" height="1">
<select size="5" name="Tipo"
onchange="nombre.value = this.options[this.selectedIndex].value">
var = nombre.value
<% strSQL = "SELECT * FROM Precios WHERE id=1"
Set RS = oConn.Execute(strSQL)%>
<%while not Rs.EOF%>
<option value="<%=rs("Id")%>"> <%=rs("Tipo_Producto")%></option> -->
<%Rs.movenext
wend
Rs.close%></select>
<p>
</td>
<td width="12%" height="1" align="center">
<p align="center"><input type="checkbox" name="Copolvo" value="ON"></p>
</td>
<td width="21%" height="1">
jesus
<input type="text" name="nombre" size="5"><%Response.write Request.Form(nombre)%>
</td>
<td width="29%" height="1">
<p align="center"></td>
</tr>
</table></Form></body>
mis tabala por el momento esta asi:
BD: Ventas
Tablas: Precio y Productos:
*-------------------------*
l............Precios...............l ........Id=Numérico
*-------------------------*........Tipo_Producto=Texto
l Id lTipo_Producto.lPreciosl ........Precios=Moneda
*---*-------------*------*
l 1 lPolvo Fino......l 1.50...l
l 1 lPolvo labado...l 1.23...l
l 2 lGrava............l 2.00...l
l 3 lGravilla..........l 1.36...l
*--*--------------*------*
Espero me hay explicado, gracias por su ayuda. Y disculpen las molestias.