Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/01/2008, 09:39
chaparro87
 
Fecha de Ingreso: marzo-2007
Mensajes: 39
Antigüedad: 17 años, 1 mes
Puntos: 0
Re: Problema con una consulta

Gente ya esta solucionado, dejo la respuesta por si ha alguien le interesa algun dia:

Dim Current_date As Date
Dim first_date As Date
Dim mCuantosDias as Long

Textfecha.Text = Date
Current_date = Format$(Textfecha, "yyyy/mm/dd")
mCuantosDias = 21
first_date = (Current_date - mCuantosDias)
Text1.Text = Module1.Engineer
rs.Open "Select * from booking where Staff_Id ='" & Text1.Text & "' And Date BETWEEN '" & Format(first_date, "yyyy-mm-dd") & "' AND '" & Format(Current_date, "yyyy-mm-dd") & "'", cn, adOpenDynamic, adLockOptimistic
Set MSHFlexGrid1.DataSource = rs