between dates

ashleyd43

New member
Local time
Today, 14:47
Joined
Mar 13, 2007
Messages
2
I'm having problems with a query i had to make for class. I need to find between dates. I've tried DateDiff but it comes back with no results. Please help me!!
 
I'm having problems with a query i had to make for class. I need to find between dates. I've tried DateDiff but it comes back with no results. Please help me!!

If you are pulling the date from a form, you can use the code below for the query.

(YourDateFieldFromTable Between Forms!YourFormName!YourControlName1 And Forms!YourFormName!ControlName2)

Control 1 and 2 on the form will be unbound textboxes (name them something like txtBeginDate and txtEndDate - and the Date field will come from your table.

A quick example might look something like this:

Code:
(tblMain.MyDate Between Forms!frmReportDates!txtBegDate _
 And Forms!frmReportDates!txtEndDate)
 
Thank you for the reply. I had ended up figuring out what to do.. I used:

Between [Enter Date From:] And DateAdd("d",1,[Enter Date To:])
 
Thank you for the reply. I had ended up figuring out what to do.. I used:

Between [Enter Date From:] And DateAdd("d",1,[Enter Date To:])

Good, I'm glad you worked it out. :)
 

Users who are viewing this thread

Back
Top Bottom