bizcard
asked on
how to create a monthly query
all right you expect I need help figuring this problem. I am working In a access file for my church. I need to query the members list that shows members birthday every months. please Help
Hi bizcard,
SELECT MemberID, MemberLName, MemberFName, MemberMName,
DateSerial(Year([Enter date]), Month([Birthday]), Day([Birthday])) AS ComingBirthday,
DateDiff("y", [Birthday], DateSerial(Year([Enter date]), Month([Birthday]), Day([Birthday]))) AS AgeToBe
FROM tblMembers
WHERE Month([Birthday]) = Month([Enter date]) And Year([Enter date]) >= Year([Birthday])
ORDER BY Day([Birthday]), MemberLName, MemberFName, MemberMName
At the prompt, enter a date within the month you want to check.
Regards,
Patrick
SELECT MemberID, MemberLName, MemberFName, MemberMName,
DateSerial(Year([Enter date]), Month([Birthday]), Day([Birthday])) AS ComingBirthday,
DateDiff("y", [Birthday], DateSerial(Year([Enter date]), Month([Birthday]), Day([Birthday]))) AS AgeToBe
FROM tblMembers
WHERE Month([Birthday]) = Month([Enter date]) And Year([Enter date]) >= Year([Birthday])
ORDER BY Day([Birthday]), MemberLName, MemberFName, MemberMName
At the prompt, enter a date within the month you want to check.
Regards,
Patrick
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Add a new column to the query.
Expr1: Month([DOB_field])
In the criteria for that column put:
Month(Date())
This will return all records where date of birth is this month.
Expr1: Month([DOB_field])
In the criteria for that column put:
Month(Date())
This will return all records where date of birth is this month.
J