Link to home
Start Free TrialLog in
Avatar of 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
Avatar of jefftwilley
Flag of United States of America image

do you want to do this from a form? or do you just want to have a query that you open and enter the month?
Avatar of Patrick Matthews
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.


Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mpmccarthy

Add a new column to the query.  

Expr1: Month([DOB_field])

In the criteria for that column put:


This will return all records where date of birth is this month.