Quick Dates filter question

oli82

Registered User.
Local time
Today, 18:59
Joined
Jan 10, 2008
Messages
54
Hi I have some VBA which filters a form by date

DoCmd.OpenForm "EntryAll", acNormal, , "[dbo_V_ABSTRACT].[ROW_CREATED_BY] = " & "'" & Me![CboCreatedBy] & "'" _
& " AND [dbo_V_ABSTRACT].[ROW_CREATED_DATE] Between #" & Me.CreatedDateFrom & "#" & " And #" & Me.CreatedDateTo & "#"

I enter filter username emmah and dates 1st April to 24th April

entering into the Filter property of the form as:

[dbo_V_ABSTRACT].[ROW_CREATED_BY] = 'emmah' AND [dbo_V_ABSTRACT].[ROW_CREATED_DATE] Between #01/04/2009# And #24/04/2009#

The only trouble is when the filter runs it queries between the dates 4th of January and the 24th of April!

Any ideas how I can fix this without setting dates in Access as US defaults - I would prefer to keep them in UK format.

Cheers,

Oliver
 
As a quick solution you could try wrapping Format(YourDates,"Medium Date") around your dates and fields.


As a matter of course do you have any formatting or input masks in your table?

Format -dd/mm/yyyy
Input mask - 99/99/0000;0;_

David
 

Users who are viewing this thread

Back
Top Bottom