Hi
I have a date and time picker control on a form.
How do I refer to its value in a query criteria?
I want the 'DateReported' field in the query to be >= dtpStart.value and <=dtpEnd.value?
Thanks
Chris
Hi
I have a date and time picker control on a form.
How do I refer to its value in a query criteria?
I want the 'DateReported' field in the query to be >= dtpStart.value and <=dtpEnd.value?
Thanks
Chris
Try
DateReported BETWEEN [Forms]![FormName]![DTPSTART_TEXTBOX] AND [Forms]![FormName]![DTPEND_TEXTBOX]
Thanks, but that's not returning any records at all. Not sure why...
Form must be open or else it will ask you to fill in the value.
Try this, my guess is that it is consider the textbox to be text not date type.
DateReported BETWEEN CDate([Forms]![FormName]![DTPSTART_TEXTBOX]) AND CDate([Forms]![FormName]![DTPEND_TEXTBOX])