Thread: between [] and [] (Access 2000)

1. between [] and [] (Access 2000)

I have a db the have customers sales in it. I run a number of queries that are in a macro. The problem is that i have to enter the between date every time. How can I get the date to be auto-entered. The date I would need it to be is between [ the first day of last month ] and [he last day of last month]

2. Re: between [] and [] (Access 2000)

Tom: Try these on for size:

1st day of Previous month: =dateserial(year(date()),month(date()),-1,1)

Last day of Previous month: =dateserial(year(date()),month(date()),0)

HTH.

3. Re: between [] and [] (Access 2000)

See this post for a quick and easy way to calculate the last day of the prior month. The first day of the prior month could be calculated by using DateAdd to subtract a month form the lastday of the prior month and then add a day. Be careful, though, I seemed to have found a minor bug in the date math that seems to think there were 29 days in Feb 2002. <img src=/S/crazy.gif border=0 alt=crazy width=15 height=15>

Here's a formula that will give you the first day of the prior month: