excluding all students that [completed] before 1st of last month

J

JethroUK©

creating a month end report & need to find all student activity for last
month

[enrolled] as date
[completed] as date

this includes all students who have [enrolled] and have not [completed], and
also includes any students that have [completed] during last month

i figure this could be summarised by single criteria excluding all students
that [completed] before 1st of last month

what do you think?
 
D

Douglas J. Steele

The first of last month would be DateSerial(Year(Date), Month(Date) - 1, 1)
 
B

Baz

JethroUK© said:
creating a month end report & need to find all student activity for last
month

[enrolled] as date
[completed] as date

this includes all students who have [enrolled] and have not [completed], and
also includes any students that have [completed] during last month

i figure this could be summarised by single criteria excluding all students
that [completed] before 1st of last month

what do you think?

If I understand you correctly, you are looking for a criterion something
like this:

WHERE ([enrolled] IS NOT NULL AND [completed] IS NULL) OR
(Year([completed]) = Year(DateAdd("m",-1,Date()) AND Month([completed]) =
Month(DateAdd("m",-1,Date()))
 
J

JethroUK©

i'll give that a try thanks


Douglas J. Steele said:
The first of last month would be DateSerial(Year(Date), Month(Date) - 1, 1)

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


JethroUK© said:
creating a month end report & need to find all student activity for last
month

[enrolled] as date
[completed] as date

this includes all students who have [enrolled] and have not [completed],
and
also includes any students that have [completed] during last month

i figure this could be summarised by single criteria excluding all
students
that [completed] before 1st of last month

what do you think?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top