11/05/2010, 20:15
|
| | Fecha de Ingreso: noviembre-2009
Mensajes: 315
Antigüedad: 15 años Puntos: 0 | |
Respuesta: error de complicion: Procedimiento demasiado largo hay esta lo que alcanzo pero el resto es mas de lo mismo, son varios if como este. No se me ocurrio otra forma: Cita: login.C7 = Combo7.Text
For i = o To 9
List1(i).Clear
Next
If Not IsNull(DTPicker1.Value) And login.C4 <> "" And login.C5 <> "" And login.C6 <> "" And login.C7 <> "" Then
If login.est = True Then
login.rst.Close
Else
End If
login.SQL = "SELECT DISTINCT * FROM requerimiento where numero = '" + login.C4 + "' and sucursal '" + login.C5 + "' and depto = '" + login.C6 + "' and funcionario = '" + login.C7 + "' fecha = '" & DTPicker1.Value & "'and estado = '" + login.val + "'"
login.rst.Open login.SQL, login.cnn, adOpenDynamic, adLockOptimistic
While login.rst.EOF = False
List1(0).AddItem login.rst(0)
login.rst.MoveNext
Wend
login.rst.Close
login.SQL = "SELECT DISTINCT * FROM requerimiento where numero = '" + login.C4 + "' and sucursal '" + login.C5 + "' and depto = '" + login.C6 + "' and funcionario = '" + login.C7 + "' fecha = '" & DTPicker1.Value & "'and estado = '" + login.val + "'"
login.rst.Open login.SQL, login.cnn, adOpenDynamic, adLockOptimistic
While login.rst.EOF = False
List1(1).AddItem login.rst(1)
login.rst.MoveNext
Wend
login.rst.Close
login.SQL = "SELECT DISTINCT * FROM requerimiento where numero = '" + login.C4 + "' and sucursal '" + login.C5 + "' and depto = '" + login.C6 + "' and funcionario = '" + login.C7 + "' fecha = '" & DTPicker1.Value & "'and estado = '" + login.val + "'"
login.rst.Open login.SQL, login.cnn, adOpenDynamic, adLockOptimistic
While login.rst.EOF = False
List1(2).AddItem login.rst(2)
login.rst.MoveNext
Wend
login.rst.Close
login.SQL = "SELECT DISTINCT * FROM requerimiento where numero = '" + login.C4 + "' and sucursal '" + login.C5 + "' and depto = '" + login.C6 + "' and funcionario = '" + login.C7 + "' fecha = '" & DTPicker1.Value & "'and estado = '" + login.val + "'"
login.rst.Open login.SQL, login.cnn, adOpenDynamic, adLockOptimistic
While login.rst.EOF = False
List1(3).AddItem login.rst(3)
login.rst.MoveNext
Wend
login.rst.Close
login.SQL = "SELECT DISTINCT * FROM requerimiento where numero = '" + login.C4 + "' and sucursal '" + login.C5 + "' and depto = '" + login.C6 + "' and funcionario = '" + login.C7 + "' fecha = '" & DTPicker1.Value & "'and estado = '" + login.val + "'"
login.rst.Open login.SQL, login.cnn, adOpenDynamic, adLockOptimistic
While login.rst.EOF = False
List1(4).AddItem login.rst(4)
login.rst.MoveNext
Wend
login.rst.Close
login.SQL = "SELECT DISTINCT * FROM requerimiento where numero = '" + login.C4 + "' and sucursal '" + login.C5 + "' and depto = '" + login.C6 + "' and funcionario = '" + login.C7 + "' fecha = '" & DTPicker1.Value & "'and estado = '" + login.val + "'"
login.rst.Open login.SQL, login.cnn, adOpenDynamic, adLockOptimistic
While login.rst.EOF = False
List1(5).AddItem login.rst(5)
login.rst.MoveNext
Wend
login.rst.Close
login.SQL = "SELECT DISTINCT * FROM requerimiento where numero = '" + login.C4 + "' and sucursal '" + login.C5 + "' and depto = '" + login.C6 + "' and funcionario = '" + login.C7 + "' fecha = '" & DTPicker1.Value & "'and estado = '" + login.val + "'"
login.rst.Open login.SQL, login.cnn, adOpenDynamic, adLockOptimistic
While login.rst.EOF = False
List1(6).AddItem login.rst(6)
login.rst.MoveNext
Wend
login.rst.Close
login.SQL = "SELECT DISTINCT * FROM requerimiento where numero = '" + login.C4 + "' and sucursal '" + login.C5 + "' and depto = '" + login.C6 + "' and funcionario = '" + login.C7 + "' fecha = '" & DTPicker1.Value & "'and estado = '" + login.val + "'"
login.rst.Open login.SQL, login.cnn, adOpenDynamic, adLockOptimistic
While login.rst.EOF = False
List1(7).AddItem login.rst(7)
login.rst.MoveNext
Wend
login.rst.Close
login.SQL = "SELECT DISTINCT * FROM requerimiento where numero = '" + login.C4 + "' and sucursal '" + login.C5 + "' and depto = '" + login.C6 + "' and funcionario = '" + login.C7 + "' fecha = '" & DTPicker1.Value & "'and estado = '" + login.val + "'"
login.rst.Open login.SQL, login.cnn, adOpenDynamic, adLockOptimistic
While login.rst.EOF = False
List1(8).AddItem login.rst(8)
login.rst.MoveNext
Wend
login.rst.Close
login.SQL = "SELECT DISTINCT * FROM requerimiento where numero = '" + login.C4 + "' and sucursal '" + login.C5 + "' and depto = '" + login.C6 + "' and funcionario = '" + login.C7 + "' fecha = '" & DTPicker1.Value & "'and estado = '" + login.val + "'"
login.rst.Open login.SQL, login.cnn, adOpenDynamic, adLockOptimistic
While login.rst.EOF = False
List1(9).AddItem login.rst(9)
login.rst.MoveNext
Wend
End If
muuuchas gracias |