Open a form and filter where date is between a date range

jjake

Registered User.
Local time
Yesterday, 18:26
Joined
Oct 8, 2015
Messages
291
Hello,

I have a form [frmPMSearch]. It has 2 unbound text boxes with date pickers.

[FromDate]
[ToDate]

It has a button. [cmdSearch]

I have another continuous form [FrmPMTasksDue] that has a field in it [DueDate].

What i am trying to acheive
The user will open the [frmPMSearch] and select 2 dates from the date pickers. a "From" date and "To" date. When the user clicks [cmdSearch] it will open [FrmPMTasksDue] and filter all results where the [DueDate] is between the 2 dates selected on the search form.

Thanks.
 
How do I adapt to allow me to put 2 requirements?
 
Try

DoCmd.OpenForm "SecondFormName", , , "FieldName Between #" & Me.ControlName & "# AND #" & Me.OtherControlName & "#"
 

Users who are viewing this thread

Back
Top Bottom