Como generar un SQL desde Text Box
Publicado por Andres Escobar (63 intervenciones) el 20/05/2002 02:29:24
Estoy creando una aplicacion y necesito generar reportes los cuales me manejan unos rangos ya sea de numeracion o fecha pero no he podido hacer que me funcionen, los datos los ingreso en una matriz denominada txtFecha(0) para el inicial y TxtFecha(1) para el final, este es el codigo que estoy usando:
Dim Inicial As Integer
Dim Final As Integer
Inicial = Val(TxtFecha(0).Text)
Final = Val(TxtFecha(1).Text)
dbs.Execute "SELECT Configurar.cedJuridica, Configurar.Ubicacion, Configurar.Empresa, certificado.Fecha, certificado.Numero, certificado.nombre, certificado.Monto, clientes.nombre & ' ' & clientes.apellidos AS Cliente INTO [Temp] FROM Configurar,clientes INNER JOIN certificado ON clientes.IdCliente = certificado.IdCliente where (certificado.numero between 'inicial' and 'final');"
Cualquier ayuda que me puedan brindar se las agradesco, en este caso en particular el me busca por numero pero tambien lo necesito por fecha.
Dim Inicial As Integer
Dim Final As Integer
Inicial = Val(TxtFecha(0).Text)
Final = Val(TxtFecha(1).Text)
dbs.Execute "SELECT Configurar.cedJuridica, Configurar.Ubicacion, Configurar.Empresa, certificado.Fecha, certificado.Numero, certificado.nombre, certificado.Monto, clientes.nombre & ' ' & clientes.apellidos AS Cliente INTO [Temp] FROM Configurar,clientes INNER JOIN certificado ON clientes.IdCliente = certificado.IdCliente where (certificado.numero between 'inicial' and 'final');"
Cualquier ayuda que me puedan brindar se las agradesco, en este caso en particular el me busca por numero pero tambien lo necesito por fecha.
Valora esta pregunta


0