Aqui tienes un ejemplo que puedes utilizar. este permite ingresar en modo ejecución datos para realizar filtros.
las fechas las debes desarmar y luego unir.
Este ejemplo yo lo tengo en mis aplicaciones y funciona bien
Saludos
If Inicio <> "" Then
FI = CDate(Inicio)
If Inicio <> "" And Termino = "" Then
Termino = Format(Date, "DD-MM-YYYY")
End If
End If
If Termino <> "" Then
FT = CDate(Termino)
End If
If Val(Termino) < Val(Inicio) Then
MsgBox ("Error en rango de Fechas...")
Exit Sub
End If
If Inicio = "" And Termino = "" Then
FI = "01-01-1900"
FT = "01-01-2100"
End If
Cod = InputBox("Ingrese Detalle a Consultar o ingrese [TODOS] ...", , Text(2))
Cod = UCase(Cod)
If Cod = "" Then Exit Sub
If FI <> "" And FT <> "" Then
MoreFormula = " And {Registro.FechaDoc} >= Date(" + Trim(Mid(FI, 7, 4)) + "," + Mid(FI, 4, 2) + "," + Left(FI, 2) + ") and {Registro.FechaDoc} <= Date(" + Trim(Mid(FT, 7, 4)) + "," + Mid(FT, 4, 2) + "," + Left(FT, 2) + ") "
Else
MoreFormula = ""
End If
If Tipos <> "" Then
MoreFormula = MoreFormula & " and UpperCase({Registro.TipDoc}) IN '" & UCase(Tipos) & "'"
End If
On Error Resume Next
Set Db = OpenDatabase("Gestion.mdb")
Set RsM = Db.OpenRecordset("Select * from Membrete")
'Membrete
Cr2.ReportFileName = "MGlobal.rpt"
Cr2.Formulas(0) = "X1='" & RsM("RazonS") & "'"
Cr2.Formulas(1) = "X2='" & RsM("Giro") & "'"
Cr2.WindowTitle = "Movimiento global de Productos"
Cr2.SelectionFormula = ""
If Cod = "TODOS" Then Cod = ""
Cr2.SelectionFormula = " '" & UCase(Rol) & "' IN Uppercase({Registro.rol}) and '" & UCase(Cod) & "' In Uppercase({Registro.Detalle}) " & MoreFormula
Cr2.Action = 1
Cr2.SelectionFormula = ""