Avatar of bizcard
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
Microsoft Access

Avatar of undefined
Last Comment
mpmccarthy

8/22/2022 - Mon
jefftwilley

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?
J
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.

Regards,

Patrick
ASKER CERTIFIED SOLUTION
Patrick Matthews

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
mpmccarthy

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.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck