One issue I had quite a while back was Access Reports with records filtered between two specific dates (dd/mm/yyyy) but with extra entries appearing outside of the specified dates on the report.

This was happening because by default Access also includes the time along with the date in a date field:

Microsoft Access Table 1

Microsoft Access Table

I had started by using Now() in the Default Value of my field and this was my mistake because Access added the full date and time to the field which is not what I was really wanting.

Access Data Table Default Value

Access Data Table Default Value

During my research to a quick solution I came across a multitude of possible ways to trim the time off the date using Left, Trim and other Built-In Functions and even some Class Modules to truncate the Date Fields but the actual solution was much simpler:

To achieve just the Date and nothing else I modified the Default Value to: Format(Now(), “d m yyyy”).

Access Data Table Default Value, Formatted

Access Data Table Default Value, Formatted

This immediately gave me the required result and when I used that field to filter dates on the report… only the records between the two specified dates showed.

Access Data Table Field Value, Formatted

Access Data Table Field Value, Formatted

Tagged with:
 

2 Responses to Access Reports filtered between two dates but showing extra records

  1. mikerosss says:

    Great site. A lot of useful information here. I’m sending it to some friends!

  2. Richard says:

    Thanks for the useful info. Great article.

    Richard,
    small business invoice

Leave a Reply