NO FUNCIONA LA BUSQUEDA ENTRE CANTIDADES
Saludos de nuevo, no me funciona, el buscar entre dos cantidades, necesito poner en dos text la cantidad minima y maxima a buscar en un registro de un base datos. Y NO SE HACERLO...NO ME FUNCIONA EL BETWEEN....COMO LO HAGO....GRACIAS
sentencia = "select * from VENTAS where POBLACIONPRODUTO='" & Text2.Text & "'"
sentencia = sentencia & " and TIPOPRODUCTO='" & Text3.Text & "'"
sentencia = sentencia & " and IMPORTEREQUERIDO BETWEEN '" & Text7.Text & "'" AND '" & Text8.Text & "'"
Adodc1.RecordSource = sentencia
Adodc1.Refresh
POR QUE NO FUNCIONA,,,,SOLO ME FALTA ESTO PARA TERMINAR EL PROGRAMILLA, LAS BUSQUEDAS ENTRE CANTIDADES CONCRETAS POR EL USUARIO....
sentencia = "select * from VENTAS where POBLACIONPRODUTO='" & Text2.Text & "'"
sentencia = sentencia & " and TIPOPRODUCTO='" & Text3.Text & "'"
sentencia = sentencia & " and IMPORTEREQUERIDO BETWEEN '" & Text7.Text & "'" AND '" & Text8.Text & "'"
Adodc1.RecordSource = sentencia
Adodc1.Refresh
POR QUE NO FUNCIONA,,,,SOLO ME FALTA ESTO PARA TERMINAR EL PROGRAMILLA, LAS BUSQUEDAS ENTRE CANTIDADES CONCRETAS POR EL USUARIO....
Porque tienes 3 sentencias¿?yo en tu lugar lo haria en una solasentencia:
-sentencia = "select * from VENTAS where POBLACIONPRODUTO=" & Text2.Text & " and TIPOPRODUCTO=" & Text3.Text & " and and INPORTEREQUERIDO BETWEEN " & Text7.Text & " AND " & Text8.Text & "" group by...
No se,yo siempre lo hago asi y me funciona.Deberas indicar a que tablacorresponde cada campo.
Espero que te sirva.
Salu2
-sentencia = "select * from VENTAS where POBLACIONPRODUTO=" & Text2.Text & " and TIPOPRODUCTO=" & Text3.Text & " and and INPORTEREQUERIDO BETWEEN " & Text7.Text & " AND " & Text8.Text & "" group by...
No se,yo siempre lo hago asi y me funciona.Deberas indicar a que tablacorresponde cada campo.
Espero que te sirva.
Salu2
