Steve Schapel
steve at datamanagementsolutions.biz
Fri Apr 1 00:10:28 CDT 2011
Rocky, I always convert dates in code to Long. That way it always works regardless of the locale. I find it simpler like that. ... WHERE DueDate >= " & CLng(Me.txtGEDueDate) & " AND DueDate <= " & CLng(Me.txtLEDueDate) Or preferably... ... WHERE DueDate Between " & CLng(Me.txtGEDueDate) & " And " & CLng(Me.txtLEDueDate) Regards Steve -----Original Message----- From: Rocky Smolin Sent: Friday, April 01, 2011 12:44 PM To: 'Access Developers discussion and problem solving' Subject: Re: [AccessD] Un-American Date Filter When I change the code to "DueDate >= #" & CDate(Format(Me.txtGEDueDate, "dd/m/yyyy")) & "#" And "DueDate <= #" & CDate(Format(Me.txtLEDueDate, "dd/mm/yyyy")) & "#" the sql statement still comes out: INSERT INTO tblKittingToMIS ( PartNumber, OrderNumber, DueDate, QuantityDue ) SELECT tblDemand.PartNumber, tblDemand.OrderNumber, tblDemand.DueDate, tblDemand.QuantityDue FROM tblDemand WHERE DueDate >= #31/03/2011# AND DueDate <= #07/04/2011# And still no date filtering.