elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Estamos en la red social de Mastodon


  Mostrar Mensajes
Páginas: 1 2 3 4 5 6 7 8 [9]
81  Programación / Bases de Datos / Duda en Sentencia SQL en Visual Basic 6 en: 21 Agosto 2009, 00:07 am
Lo que deseo es que cuando seleccione en el DTPiker inicial y el DTPfinal un rango de fechas me filtre las facturas creadas en esas fechas y me lo muestre en un List1

'------------------Module Sentence---------------------------------------------------
Sub main()
With Base   
    .CursorLocation = adUseClient
    .Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\sistemaelangel.mdb;Persist Security Info=False"
    LoginForm.Show
End With
End Sub
'------------------Module Declare-----------------------------------------------------
Global Base As New ADODB.Connection

Global RsFactura As New ADODB.Recordset



------------------Código en el Form--------------------------------------------------
Sub llenalista1()
Dim sqllista1 As String
sqllista1 = "SELECT COUNT(fecha) as cantidad FROM TablaFactura AND  fecha BETWEEN #" & Format(DTPicker1, "mm/dd/yyyy") & "# AND #" & Format(DTPicker2, "mm/dd/yyyy") & "#"

List1.Clear
Do While Not TablaFactura.EOF
List1.AddItem TablaFactura.Fields("cantidad")
TablaFactura.MoveNext
Loop

End sub                                               :huh:
Páginas: 1 2 3 4 5 6 7 8 [9]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines