Between 2 dates

NigelShaw

Registered User.
Local time
Today, 15:44
Joined
Jan 11, 2008
Messages
1,575
Hi,

how would i set criteria on a query between 2 dates? i need to run a report every month between the dates 4th of current month and 5th of previous month. i wanted to either run this in code or set the criteria on the query but by setting the query criteria, it needs to pick up the current month.

a further question on this would be-

how would this work in 12 months? would it run the same query and collect 2 years worth of info or can it set with years too?

i was planning 2 options.

quick report ( click button and this months report is generated )
select report ( where they can select their desired period )

the dates will ALWAYS be the same and no other dates will be required.

any advice, graciously received.



thanks,


Nigel
 
Enter the following in the criteria for your date field.

Between [Start Date] and [End Date]

When you run the query you will be prompted for a start date and an end date.

You may use this to enter whatever dates you wish to cover whatever time frame you wish.
 
Hi,

i already have that. the user cannot have the option of entering dates so they need to be fixed at 5th of previous month to 4th of current month. these are the ONLY 2 dates used ever. i would like to remove the enter box for any type of date input.

regs,


~Nigel
 
Copy this to the criteria cell of your date field:

>= dateserial(year(date()), month(date())-1,5) and <= dateserial(year(date()), month(date()), 4)

Bob
 
Copy this to the criteria cell of your date field:

>= dateserial(year(date()), month(date())-1,5) and <= dateserial(year(date()), month(date()), 4)

Bob

Is there something you can use to automatically generate the last calendar month as well?
 

Users who are viewing this thread

Back
Top Bottom