Results 1 to 3 of 3
  1. #1
    BobV is offline Novice
    Windows 10 Office 365
    Join Date
    Mar 2020
    Posts
    2

    Need a qry that reports birthdays for a given designated month

    I haven't done this for a while, so forgive me if this something simple. But...I created a church directory db a number of years ago. New church Secretary wants reports on every family's anniversary date by the month she would designate. I've got that one...query asks for the month she wants to see; she enters 1 for Jan, 2 for Feb, etc. and it reports out all anniversaries for that month regardless of year. Ok, that wasn't too bad, but only dealt with LastName, FirstName, and Anniversary Date. So now...birthdays...same way, but this is a little more involved since it's husband, wife, and up to 4 children's names and birth dates. Field names are: LastName, HusbandFN, HusbandBirth, WifeFN, WifeBirth, Child1FN, Child1Birth, and so on. How would I go about creating a query that gives me the same thing as the anniversary query did, reporting all names and birth dates by month requested. Thanks for any help anyone might give.

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    There would be a simple solution but it won't be reliable if there is no way to associate family members, which is what I suspect by your post. That's because if there are 2 Smith families you have no way of differentiating them (unless you can do so by complete address or something). You could have a junction table just for this, or a field in that table whereby each family member gets the same association value. However, down the road you will have to manage this when little Johnny gets married and has his own family with the same last name. Then there is the fact that these days, not all women take the husband's last name, so a junction table will be more adaptive.
    However, all that is moot if you've designed the tables like a spreadsheet, which your post suggests is the case. Seems like you have repeating fields:
    Child1FN, Child1Birth, and so on.
    and probably Child2 and Child3 and Child4... fields. That's a spreadsheet, and if that's what you have I suggest you research db normalization. You might get feedback on your current state if you post a pic of your table relationships, assuming you have created them.
    Last edited by Micron; 09-17-2022 at 06:10 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    Join Date
    Apr 2017
    Posts
    1,679
    To design your database in normalized way, you need something like:
    tblPersons: PersonID, BirthDate, DeathDate, ... (Where PersonID is autonumeric or manually entered unique identifier and Primary Key);
    tblNameChangeReasons: NameChangeReasonID, NameChangeReason (Where NameChangeReasonID is autonumeric id and Primary Key);
    tblPersonNames: PersonNameID, PersonID, FirstName, LastName, ReasonID, ValidAtDate, ... (Where PersonNameID is autonumeric id and Primary Key, PersonID is Foreign Key linked to tblPersons.PesonID, and ReasonID is Foreign Key linked to tblNameChangeReasons.NameChangeReasonsID. This table covers name changes by person's request, or by marriage);
    tblRelationTypes: RelationTypeID, RelationType;
    tblPersonRelations: PersonRelationID, PersonID, RelatedToPersonID, RelationTypeID, ValidAtDate (From now on, key fields continuing as above);
    tblFamilies: FamilyID, FamilyName, FamilyCreatedAt, FamilyDisbandedAt;
    tblFamilyMemberStatuses; FamilyMemberStatusID, FamilyMemberStatus;
    tblFamilyMemberStatusHistory: FamilyMemberStatusHistoryID, FamilyId, PersonID, FamilyMemberStatusID, StatusFromDate;

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 11-26-2017, 12:49 PM
  2. Making Month Names show in query reports
    By jdboss53 in forum Queries
    Replies: 7
    Last Post: 01-04-2017, 05:18 PM
  3. Replies: 8
    Last Post: 09-29-2015, 10:37 AM
  4. Reports - totals by month
    By mtpyra in forum Reports
    Replies: 1
    Last Post: 06-12-2011, 09:19 PM
  5. Reports filtered by Month
    By Douglasrac in forum Access
    Replies: 3
    Last Post: 01-27-2011, 05:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums