Hello,
We use an access database for the membership administration of thousands of musicians. Membership status varies from "active" to "suspended" to "expelled".
Musicians go in and out of active membership. The database keeps track of the last time a member was suspended and the last time a member was expelled. Unfortunately, like many programs, the history is written over each time.
My goal is to automate capturing a "30-years of membership" date and a "50-years membership" date. We hold a special event each year for 30 and 50 year members. Since our files go back over 100 years, the old handwritten records are great. Folks did not write over old dates in those days! We have brought the old pre-computer imformation into our database with a DaysOut field and an AsOfDate field. For example, Willy Makeit, a lead trumpet player, was admitted on 2/25/46 and has been out of the union for 656 days, I wrote a simple query to do the math and provide data for a "30-years of membership" field and a 50-years of membership" field in a form.
However, there is new data to be considered after the AsOfDate.
Due to the limited history in this database all I have to work with is a History Table. A query of Member Number 1072 yields the following data:
Date Desc MusID
2/4/2003 Suspended for non-payment of dues 1072
2/21/2003 Dues thru 3/31/03 (Rec# 19401). Status was Suspen 1072
11/7/2003 Suspended for non-payment of dues 1072
12/15/2003 Dues thru 12/31/03 (Rec# 24630). Status was Suspe 1072
2/9/2004 Suspended for non-payment of dues 1072
4/5/2004 Dues thru 6/30/2004 (Rec# 28110). Status was Susp 1072
10/31/2004 Suspended for non-payment of dues 1072
7/31/2005 Suspended for non-payment of dues 1072
9/30/2005 Expelled for non-payment of dues 1072
10/17/2005 Dues thru 12/31/2005 (Rec# 51852). Status was Exp 1072
1/31/2006 Suspended for non-payment of dues 1072
3/10/2006 Dues thru 6/30/2006 (Rec# 58927). Status was Susp 1072
7/31/2006 Suspended for non-payment of dues 1072
8/9/2006 Dues thru 12/31/2006 (Rec# 64736). Status was Sus 1072
1/31/2007 Suspended for non-payment of dues 1072
My goal is to write a code that selects the first *non* date and the next *was* date and subtracts the difference. The aggregate of each date difference will be the total DaysOut.
Please excuse me if this post is too long winded. Basically I need to get the next date in the record and subtract it from the first previous date and add up each group of two. If the last date is a *non* it will be subtracted from Date()
Any help will be greatly appredciated.
Unionhorse
We use an access database for the membership administration of thousands of musicians. Membership status varies from "active" to "suspended" to "expelled".
Musicians go in and out of active membership. The database keeps track of the last time a member was suspended and the last time a member was expelled. Unfortunately, like many programs, the history is written over each time.
My goal is to automate capturing a "30-years of membership" date and a "50-years membership" date. We hold a special event each year for 30 and 50 year members. Since our files go back over 100 years, the old handwritten records are great. Folks did not write over old dates in those days! We have brought the old pre-computer imformation into our database with a DaysOut field and an AsOfDate field. For example, Willy Makeit, a lead trumpet player, was admitted on 2/25/46 and has been out of the union for 656 days, I wrote a simple query to do the math and provide data for a "30-years of membership" field and a 50-years of membership" field in a form.
However, there is new data to be considered after the AsOfDate.
Due to the limited history in this database all I have to work with is a History Table. A query of Member Number 1072 yields the following data:
Date Desc MusID
2/4/2003 Suspended for non-payment of dues 1072
2/21/2003 Dues thru 3/31/03 (Rec# 19401). Status was Suspen 1072
11/7/2003 Suspended for non-payment of dues 1072
12/15/2003 Dues thru 12/31/03 (Rec# 24630). Status was Suspe 1072
2/9/2004 Suspended for non-payment of dues 1072
4/5/2004 Dues thru 6/30/2004 (Rec# 28110). Status was Susp 1072
10/31/2004 Suspended for non-payment of dues 1072
7/31/2005 Suspended for non-payment of dues 1072
9/30/2005 Expelled for non-payment of dues 1072
10/17/2005 Dues thru 12/31/2005 (Rec# 51852). Status was Exp 1072
1/31/2006 Suspended for non-payment of dues 1072
3/10/2006 Dues thru 6/30/2006 (Rec# 58927). Status was Susp 1072
7/31/2006 Suspended for non-payment of dues 1072
8/9/2006 Dues thru 12/31/2006 (Rec# 64736). Status was Sus 1072
1/31/2007 Suspended for non-payment of dues 1072
My goal is to write a code that selects the first *non* date and the next *was* date and subtracts the difference. The aggregate of each date difference will be the total DaysOut.
Please excuse me if this post is too long winded. Basically I need to get the next date in the record and subtract it from the first previous date and add up each group of two. If the last date is a *non* it will be subtracted from Date()
Any help will be greatly appredciated.
Unionhorse
Comment