Buen dia, tengo un problema espero puedan ayudarme
tengo la tarea de hacer una consulta de algun producto y a partir de que fecha hasta la fecha actual estaba, mi problema es que si busco por producto solamente, no hay ningun problema pero si intento buscar por fechas no me muestra los registros que tengo
con la fecha actual me podrian ayudar??
este es mi codigo
fechaActual = Date.Today
On Error Resume Next
tbAux2.Close()
On Error GoTo 0
tbAux2.Open("Select MovProducto, MovFecha from Movimientos where MovProducto='" & Trim(txtProducto.Text) & "' and MovFecha between '" & txtFecha.Text & "' and '" & fechaActual & "' ", CnCP,
ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockReadOnly)
lstEstatus.Items.Clear()
If Not tbAux2.EOF Then
Do
lstEstatus.Items.Add(Format(tbAux2("MovProducto").Value, "{0,-18}") & " " & Format(tbAux2("MovFecha").Value, "MM/dd/yyyy hh:mm"))
tbAux2.MoveNext()
If tbAux2.EOF Then
Exit Do
End If
Loop
End If
tbAux2.Close()
Espero puedan ayudarme
Saludos