Date Range Help, Please!

ShanesLittleT

New member
Local time
Today, 04:21
Joined
Sep 18, 2003
Messages
6
Using Access 2000

I need a little help with coding please. I'm trying filter a subforms recordset using two date fields [txtBeginningDate] and [txtEndingDate] I have it almost working but would like someone to take a look and see if you could lend a hand shoring it up.

Me.frmOrderssub.Form.RecordSource = "SELECT * FROM Orders WHERE Orders.StartDate BETWEEN #" & Forms![frmOrdersNavigator]![txtBeginningDate] & "# And #" & Forms![frmOrdersNavigator]![txtEndDate] & "#"

The code above causes something to happen but it's not right. I put 9/20/03 in the beginning date field and 9/26/03 in the end date field and it showed records with a 9/22/03 Start Date, it should have showed two more records matching this criteria. Also if I type dates with in a few days of each other ie 9/20/03 and 9/22/03 the subform shows no records and there are records that match this criteria.

Any help would be appreciated,

Thanks ahead of time,
Shane
 
Never mind. This is working after all. I was looking at the wrong field. Sorry! It's getting late and I've been doing this too long.
 

Users who are viewing this thread

Back
Top Bottom